This post explains how to write WordPress code following modern PHP best practices, adhering to the official (or other established) coding standards.
Talking about “testable code” is usually done in the context of unit testing. Writing testable code thus requires understanding unit testing. Learn it now.
Want to read some rant on poorly written premium stuff? Go ahead then…
Want to know (and improve) the quality of the JavaScript code in your WordPress projects? Use ESLint for this, and respect the WordPress Coding Standards.