Plugin Strategy

Plugin StrategyIn our last blog post, Built To Last, we mentioned the necessity of building into the core of WordPress and never modifying existing Plugins, themes, or core files. We wanted to expand on this topic a bit and explain more about these best practices with what we’re calling “Plugin Strategy”.

WordPress was traditionally a blogging platform and has evolved into a full featured Content Management System (CMS). It is even more than that to PHP developers. WordPress serves as a PHP framework—providing many tools and resources for developers to design their Plugins with.

Despite all that WordPress has to offer developers, many don’t necessarily take the time to learn what all the core can do. This can mean reinventing the wheel by bringing in performance costing library files that otherwise aren’t necessary, making custom User Experience (UX) elements that don’t match WordPress, or creating Plugins that are essentially islands to themselves based on how they store data and only mildly hook into WordPress.

Let’s examine the WordPress framework to enlighten ourselves on how core developers built the platform to be extended. To begin, here’s a fairly complete list of current WordPress core API features. These interfaces are built and maintained by the WordPress core team and offered to the WordPress developer community:

The idea of building to the core is to utilize the above APIs as needed for as many purposes as possible, including: data storage, manipulation, and page rendering. In this way, Plugins can interact with the site’s content and with each other as intended by the WordPress core team. A plugin should be thought of as an extension to the core, something that can be enabled or disabled, combined with other Plugins, and whose output is compatible with other quality Plugins and themes.

Our next building to the core concept is “no hacking”. The idea here is to never alter existing Plugins, themes, or core files (code). Doing so will break future community contributions, updates, and security fixes trickling down from those project contributors. The Plugins that one uses should perform all the necessary functionality within their scope, ideally a single service, and other Plugins can be written to add or change most behaviors that WordPress itself offers control over. Thus, there is little reason to even consider modifying an existing plugin, theme, or core file. The cost of doing so will come back to bite in the short term. You’re better off building to the core with any custom projects you may have, plus for any existing Plugins you use stick with only quality projects.

Thank you for taking the time to read this post. Note that we really appreciate feedback about what we’ve written as well as what topics you’d like us to discuss in future posts so please do let us know.

Advertisement