This week, I’m going to give you a 3 step process for writing perfect commits. If you’re working on code and aren’t using a versioning system, you should definitely start there. Atlassian has a great introductory section in their docs if you want to learn more. One of the best things about version control is […]
Newsletter
Collect Usage Data With A Simple Hook
As a plugin developer, one of your biggest hurdles with the WordPress ecosystem is that you don’t have a standard way of gathering metrics on how your plugin is used. You can see how many people have downloaded your plugin, and how that download metric is trending. But what does that get you? Not much. […]
Create CSV Exports of WordPress Data
If your plugin is storing any kind of data for the user, at some point they may want a feature to export that data into a format that they can work with. Usually, this means a standard format that works well with spreadsheets or other tools. CSV is a great format for exporting. Today I’m […]
Add PHP Compatibility Checks to Your Process
This week, I’m going to walk you through what it takes to start checking your plugin’s PHP compatibility. Every time I start a new plugin, one of the first things I do is configure a composer script that checks PHP compatibility for me. If you are writing a WordPress plugin, you should be checking it’s […]
3 Lessons I’ve Learned Building Enterprise WordPress Plugins
Over the last few years, I’ve built quite a few plugins—most of them never installed on more than one site. When a client wants a bit of custom functionality, there’s no better tool in your tool-belt than a custom plugin. If you need the same functionality on a couple of sites (for the same client […]
WordPress Nonce 101: What are they and why do they matter?
If your plugin has its own settings page and performs any kind of CRUD (Create, Read, Update, Delete) action, then you should be using nonces. If you’ve never heard of the term nonce before, WordPress defines it in the codex as, “number used once”. Once a nonce is used, it cannot be used again—a one-time […]
SWPD #014: Does Your Plugin Need a Custom Database Table?
WordPress has grown to be a huge portion of the internet and therefore has been proven to scale really well in the right conditions. At its core, it’s just a PHP application interfacing with a MySQL database, but sometimes you need additional functionality with the database. Every time I find myself storing lots of records […]
SWPD #013: How to Make Breaking Changes In your Plugin
If you’ve created a plugin in the WordPress repository, you’ve likely been at a point where you need to modify or remove a publicly accessible function. By publicly accessible I mean: Any function or hook that could be used by other developers modifying your plugin’s functionality. If developers rely on these functions, how do you […]
SWPD #012: Semantic Versioning 101
If you have a plugin in the WordPress repository, the plugin team requires that you have a version number. However, I see a lot of plugins declaring arbitrary version numbers for their releases. As an example, Jetpack, one of Automattic’s commercial plugins is currently on version 12.3 with the version 12.4 approaching. While this is […]
SWPD #011: The Four Levels of Automated Testing
This week, I’m going to walk you through the four levels of automated testing. Each level of testing covers a different aspect of the overall quality of your plugin code. It provides confidence that the code does what you expect it to do, in all cases. Unfortunately, lots of developers aren’t aware of each level […]