
(An interface is a set of defined parameters that a module takes as input, and what it outputs back.) A closely related term is the single responsibility principle: Every code module (or function) should be responsible for one thing only. Instead, they should be organized into distinct sections or modules, passing data to each other through a defined interface. Separation of concerns means that parts of WordPress PHP code having different functionality or purposes shouldn’t be mixed together. Modern WordPress Development Best Practice #1: Follow “Separation of Concerns”


So, which modern software design principles and PHP features and will give you the best value for your time? Following are 10 WordPress and PHP development practices that I highly recommend. You might think of this as a PHP/WordPress tutorial, but a bit more advanced, with the assumption that you’ve already done some WordPress back-end customization. Now it’s time to take the bull by its horns, and wrestle with PHP: Specifically, how to follow best practices when working with back-end WordPress code. In Part 1 of our two-part series, we focused on overall project and workflow tools, followed by front-end development. Some developers take this as an excuse to cut corners in their own WordPress PHP code, but this approach is more expensive in the long run for all but the most trivial changes. Yet legacy code in its core is a mess, and this problem cascades to third-party developers. WordPress is the most widely used site technology on the planet and with good reason.
