WordPress plugin intelligence profile

Plugin Builder

Gets started building a plugin using the WordPress Plugin Boilerplate in seconds, not hours. Speed up your development.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.7
Current version1.0.0
WordPress coverageTested up to WordPress 4.7
Minimum stackWP 3.0.1 · PHP —
Directory statusactive
Last directory update20 Apr 201511y ago
Active installations20Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Plugin Builder version 1.0.0 as active, updated 11y ago and tested up to WordPress 4.7.

Overview

About this plugin

This is a plugin for WordPress plugin developers. If you don’t understand what PHP, HTML, CSS, add_action and apply_filters are then this plugin is not for you!

The WordPress Plugin Boilerplate is a fantastic tool for standardising WordPress plugins, and encouraging developers to use best practices. But manual editing of every file to enter the name of the plugin, the author name and all the other metadata is a bit of a chore. This plugin automates that process, giving you a simple form to enter your metadata, then when you hit the ‘Build’ button your new plugin is created with all the correct metadata.

But there’s more. php files created automatically, and all the relevant code to include those files in your plugin. Once your plugin is built you can, of course, edit the files in any way you want to add extra methods.

Plugin Builder will even create a manager class for your Custom Post Types if you want, as a place to store methods related to your CPTs – such as a get_all() method, for example.

And that’s not all. Some developers like to include extra items in their plugins, like utility classes or frameworks such as the WordPress Settings Framework. Plugin Builder automates that process, too, by downloading and including the files you choose in your new plugin.

Plugin Builder comes with a range of these additional includes you can choose from, but if there are other items you want to include you can make those part of the build process really easily (by extending a simple interface and using a filter).

So, let’s look at the traditional way of using the WordPress Plugin Boilerplate to create a new plugin:

  • Download the Boilerplate and extract it
  • Rename all the files using your plugin name (e.g. ‘class-plugin-name.php’ to ‘class-my-plugin.php’)
  • Go through all the files and replace the metadata with your plugin details (name, slug, author, URIs etc)
  • Create your CPT class and the registration code,
  • Add the code to include the CPT file and register the CPT with WordPress
  • Create a custom class
  • Add the code to include your custom class file
  • Download your favourite utility files to your plugin folder
  • Add the code to include your utility files in your plugin

Or, using Plugin Builder:

  • Enter the details of your plugin (name and description – the slug and class name are automatically created)
  • Enter the details of your Custom Post Type (name and description, whether you want a manager class creating)
  • Enter the details of your custom class (name and description)
  • Check the box next to any utility files you want to be included
  • Press ‘Build’

My guess is Plugin Builder will save you 2-4 hours work, and make your plugins much more standard in their architecture.

When your plugin is built the settings for it will be saved so you can rebuild your plugin at any time (this will overwrite any changes you’ve made manually) or make a few changes and create a new plugin.

Optional includes

The optional includes available in Plugin Builder are:

WordPress Settings Framework

The WordPress Settings Framework aims to take the pain out of creating settings pages for your WordPress plugins by effectively creating a wrapper around the WordPress settings API and making it super simple to create and maintain settings pages.

util.php

php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects.

Expect more includes to be bundled with future versions of Plugin Builder. If you have an idea for an include you want and you think it may be useful for other developers let me know. Or, add your own include (see the next section for details).

Adding your own includes

Adding your own includes to Plugin Builder is really easy. There’s an interface named Plugin_Builder_Include which you need to extend, it has a few methods that need to be implemented. Then you add a call to a method in your include class for the plugin_builder_includes filter.

Here’s a simple example:

class My_Include implements Plugin_Builder_Include {

/** * The method run when the user has selected this include. 0 * @var Plugin_Builder_Settings $settings The settings for the plugin being built. */ public function process_include( $settings ) {

// This is where you would do the work for your include; downloading files and saving them locally, // creating folders, adding settings etc.

// Returns 'true' if your processing succeeds, and a string detailing the error if it fails.

org/Filesystem_API global $wp_filesystem; if (! isset( $wp_filesystem ) || null == $wp_filesystem ) { return false; }

e. text-based) files. $cache_file = PLUGIN_BUILDER_DIR.

php';

// copy the file to the build folder $wp_filesystem->copy( $cache_file, $settings->build_path. php' );

return true;

}

/** * Returns any code to be injected into the top of the load_dependencies() method. 0 */ public function get_dependencies_code() {

php file, so it must be valid.

return " /** * My Include * * My Include is an example include for the Plugin Builder plugin. * */ require_once plugin_dir_path( dirname( __FILE__ ) ). php'; ";

}

/** * Returns the unique slug for this include. 0 */ public function get_slug(){

return 'my-include';

}

/** * Returns the translated title for this include. 0 */ public function get_title() {

return __( 'My Include' );

}

/** * Returns the translated description (HTML allowed) for this include. 0 */ public function get_description() {

</p>' );

}

/** * Returns the URL giving more information on this include. 0 */ public function get_info_url() {

com/my-include/';

}

/** * The method that will be called when the add_includes filter runs. 0 * @var array $includes The array of includes. */ public function add_includes( $includes ) {

return $includes;

}

}

// add this include to Plugin Builder using the plugin_builder_includes filter $my_include = new My_Include(); add_filter( 'plugin_builder_includes', array( $my_include, 'add_include' ) );

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • boilerplate
  • development
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.7

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.7.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.7
Minimum requirementsWordPress 3.0.1 · PHP not listed
Update activity20 Apr 201511y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.