Red and yellow leaves on a tree.

Plugin Machine Update: Beta 3

Today I made the third beta update available for beta testers. This is an update I was working on for over a month now. It represents incorporates feedback from beta testers and conversations I’ve been having with WordPress plugin developers and community members.

Plugin Machine is a tool for making plugin development easier, faster and more joyful. Talking with other developers, and using Plugin Machine to help me develop some plugins for clients has made one thing really clear: boilerplate isn’t enough. Yes, Plugin Machine started as a boilerplate generator for plugins and can solve those problems, but it does more than that.

This new version includes an API that I am building to support a CLI and vsCode extension for adding new features and tests to existing plugins. This will support plugins created with Plugin Machine and pre-existing plugins. This allows you to start a plugin with just the scaffolding you need, and add features as you go.

I talked more in depth about plugin boilerplates, their limitations and how Plugin Machine goes further, on last week’s episode of the WP Watercooler Dev Branch podcast. I wrote a tweet thread summarizing my thoughts as well:

New Features

If you are already a beta tester, these features are now available to you. Those of you who signed up for early access will need to wait until beta 4.

  • New API
    • CRUD API routes for plugins.
    • CRUD API routes for plugin features.
    • API is currently unstable and will be documented once stable.
  • Completed user profile editor.
    • Click the cat in the top right corner to access your profile
    • Set a default Github organization
    • Access your API token
  • Added option to new plugin creation UI for skipping choice of features.
  • Added option to new plugin creation UI for plugins with existing an existing codebase.
    • This doesn’t do much now. Is part of the plan for supporting plugins that are already under development to use the build tools planned for beta 5.
  • Ability to preview and modify code in UI.
    • In the plugin editor, click the “View Files” button to view the generated files.
    • You can also edit the files and save changes.
    • This is a very basic file editor. I’m considering a more full featured IDE. Let me know if you have ideas.
  • Meta field registration feature.
  • Rebuilt hook editor to include core hooks.
  • Added pluginMachine.json to each built plugin to support the CLI.
Plugin Machine code editor
Editing code for a block sidebar before generating the plugin.

Plugin Machine CLI

The new API is being built to support a CLI that can add new features or tests to your plugins. It also will be able to handle releasing plugins. It is not ready for beta testing yet. But will be soon.

You can take a look at the Github repo for the CLI here. I used Laravel Zero, which is a simplified version of Laravel for creating console applications. I really enjoyed having all the Laravel features I needed and a lot less files to dig through. I’m using Laravel Zero for a client project as well right now, I will need to write a full post about it soon.

What Is Next?

I’m working right now on updating and expanding the documentation. Here is a little bit more about what I am planning to do next.

Upcoming Online Talks

I will be recording a few demos and helpful videos. I’ll also be talking at the WordPress Pittsburgh meetup group about WordPress build tooling.

Beta 4 Plan

The next beta should not take as long as this one did. I have a shorter list of goals for this. I will likely make this beta will be open for early access subscribers.

  • eCommerce so people can subscribe
  • Enable file editor in UI for hooks.
  • Stable API and first CLI release.

Beta 5 Plan

The plan for the hopefully final beta is less defined, but this is what I am thinking:

  • Build plugins for production release via UI or CLI.
  • Improve test generator
  • Generator for PHP classes

Any Questions?

If you have any questions, feedback about Plugin Machine or want to discuss how this might help your company, please reach out.

New eBook

Refactoring WordPress Plugins

The PHP Parts

 For experienced WordPress developers who are looking to improve the PHP in their plugins, use new modern best practices and adopt test-driven development.