A few months ago, I released my WordPress Widget Boilerplate. Since then, it’s received several contributions from the community that’s made it a solid resource off of which to begin building WordPress Widgets.

In that same post, I mentioned that I was working on a boilerplate for plugins but had yet to finish it; however, today – with a little help of a few contributors that have already been watching the repository – I’m releasing the WordPress Plugin Boilerplate.

WordPress Plugin Boilerplate

Similar to the Widget Boilerplate, the WordPress Plugin Boilerplate includes the following features:

  • File Organization. The Boilerplate ships with both JavaScript sources and stylesheets for both the administrator and the client-side views. It provides a basic localization file to make it easy to localize the plugin. It also includes a stubbed out README that follows WordPress conventions.
  • Documented Code. Each file of the plugin and each method of the core code is clearly documented for its purpose in the overall plugin. Additionally, the core code includes various TODO’s to make it easy for your IDE to locate everything you need to populate when working on your plugin.
  • API Implementation. The Boilerplate is based on the WordPress API in order to enforce best practices when building on top of the WordPress platform. This makes it easy to develop conventional, familiar code and makes it easy to compare your work with the recommendations of the Codex.
  • Action and Filter References. One of the challenges of working with plugins is managing actions and filters. The Boilerplate includes references to all WordPress documentation of both and already includes two templates for both actions and filters.
You can check out the project on GitHub. Feel free to watch, fork, and/or contribute – I’d love for this to become a solid boilerplate for plugin development.