❌

Reading view

Testing Out WordLand

One of the reasons I migrated my site to WordPress was all of Dave Winer's evangelism. One of the things Dave has done is an external editor for WordPress called WordLand. I had tested it out briefly with a test site on WordPress.com, but now that my main site is on WordPress, I'll see how it works. This post, was written with WordLand. I wasn't sure if it worked with self-hosted apps, but I guess because my site is linked up with WordPress.com via Jetpack, it just works.

  •  

Learning Modern WordPress Plugin Development

I’ve been out of the WordPress plugin game for a while now. I closed my Nofollow Links plugin back in 2021 and haven’t kept up since then.

However, now I’m running WordPress again and looking to get back up to speed.

Since I built and maintain the RssCloud Server and wanted to make sure my blog supports RssCloud, I installed the RSS Cloud plugin, which seems to work, despite not having been updated since December, 2022.

I decided to put a copy of the plugin on GitHub so I can work on it and share it with the plugin maintainer. Boy, plugin development has changed a lot since 2021.

It took a lot of effort to pull together a coherent view of all the new tooling, so I wanted to jot it all down here, not only for myself, but also for anyone else interested in plugin development. Once I have my head wrapped around it, I’ll start trying to see if I can contribute changes to the official documentation to bring it up to date.

Plugin Integration Tests and WP-CLI Scaffolding

I started reading the Plugin Integration Tests documentation in the WP-CLI Handbook. Despite saying it was updated on July 1, 2025, it has signs of being out of date. For instance, it talks about Travis CI, but the default CI included by wp scaffold plugin-tests my-plugin is CircleCI. Travis CI no longer seems to be available.

This page also directs you to look at sample-plugin, which hasn’t been updated in 9 years and isn’t what WP-CLI generates. Those files are defined in scaffold-command/templates.

Since I’ll be hosting this plugin on GitHub, I needed to run wp scaffold plugin-tests rsscloud --ci=github to generate the correct files for GitHub Actions.

Testing With Different Versions

Initially, I was going to configure Docker so I could run the plugin in different versions of WordPress and PHP. I already have WordPress Studio to run a local copy of WordPress on my Mac mini, but I discovered that for development it’s easier to use wp-env, which is a command-line tool that spins up Docker environments.

I was struggling to figure out how to use wp-env with the flow from the previous documentation. I couldn’t run any of the scripts locally (needs Apache and MySQL installed locally), and running wp-env cli phpunit wasn’t working either.

What connected the dots for me was looking at the source for the Gutenberg plugin.

Now, Gutenberg is a massively complex plugin, and its tooling seems overkill for the RSS Cloud plugin. But I was able to start pulling pieces over. In particular, I needed to set up package.json and composer.json files with appropriate scripts. I won’t replicate them all here, but this is a taste of what needed to be added:

"scripts": {
    "test:unit:php:setup": "wp-env --config .wp-env.test.json start",
    "test:unit:php:base": "wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/rsscloud' wordpress vendor/bin/phpunit -c phpunit.xml.dist --verbose",
    "test:unit:php": "npm-run-all test:unit:php:setup test:unit:php:base"
}

As you can see, they use wp-env along with a custom .wp-env-test.json file, and it specifies the --env-cwd to point at the plugin directory.

Now, in my terminal, I can just call npm run test:unit:php and have it work properly in the test environment.

I also found I can update .wp-env.test.json to specify the specific version of WordPress and PHP I want to use. This will make it very easy to run tests in various environments.

Missing Subversion

After getting this all working locally, I created a few simple tests and created a pull request on my repo. This should trigger the GitHub Action workflow to run the unit tests in three different PHP versions (7.4, 8.0, and 8.2), which seemed reasonable.

First, the tests failed because the setup script (from the scaffolding) required Subversion to be installed. This should have been included in the .github/workflows/testing.yml file, but it wasn’t. I just had to add an additional step, “Install SVN” and everything worked.

Final Touches

I’m now mostly experimenting with this setup. I’ve added new scripts to generate test coverage reports so I can look for cases that I still need to write tests for. The existing plugin doesn’t seem to have any existing unit tests, so I’m starting from scratch.

I also have linting configured so I can make sure the code follows WordPress Coding Standards.

  •  

Sure, I β€œTrust The Process,” But,

Pie Chart: Trusting the Process

The first time I remember ever hearing the phrase “trust the process,” I was interviewing my friend Mick about the house he’d built. It had taken him eight years of evenings and weekends, and started, kind of ironically, with him spending an entire weekend peeling three 20-foot logs before he realized he’d had the draw knife backward the whole time.

He stuck with it, of course, and built a house so beautiful you’d never guess he had no idea what he was doing when he started. The house was wonderful to spend time in, but I really loved the story of him creating it with his own hands, without ever taking out a loan or putting anything on a credit card. 

People still use the phrase “trust the process” nowadays, and it always makes me think of Mick, who died in 2012. If he were still around, I might press him to elaborate about his relationship with the process, since he was also a passionate photographer, business owner, writer, and runner. I wish I could ask him, “Mick, is ‘trust’ really the right word for what we do?” 

There’s a clip of a 2016 postgame interview that bubbles up during college basketball season every year, after senior Dennis Clifford’s last game with Boston College, a program that had had losing seasons every year of Clifford’s career. They had just lost in the ACC Tournament to Florida State, to go 0-18 in conference play. In the clip a reporter asks Clifford, “Cliff, what are you going to take away as your best memory from playing basketball at Boston College?” 

Dennis Clifford: “Probably just … 

[pauses for 19 seconds to try to compose himself] 

… going out to eat.” 

 

There are a number of ways people interpret this clip—including that when you’re playing on a losing team, the basketball isn’t the best part and you have to find something else to focus on. But a lot of other people have commented about the profundity of Clifford’s words and sentiment, saying that it’s not about winning, it’s about all the time you spent with your friends doing something together, and I think they get it. 

This past week, I chatted with my friend Mario Fraioli, who is a running coach, writer, and podcaster. As always, our conversation bounced back and forth between running and creativity, and big goals like “running X race” and “writing a book.” I was running my mouth about how long it takes to write a book, and how the writing is really the best part, and how much time runners spend training for races (versus actually racing), and I said something along the lines of “like 99 percent of my running is ‘training,’ so I better enjoy at least some of it, right?” 

And then after we hung up, since I am a nerd, I went ahead and looked it up, a process that I must sheepishly admit involved downloading a spreadsheet, sorting that spreadsheet, and doing a not-small amount of mathematics. I looked at a year where I entered two races (pretty typical for me) and did a lot of running, and calculated that I spend 95.4 percent of my running time that year “training,” and 4.6 percent of my running time racing. This is pretty much in line with a lot of online marathon training programs: 16 weeks of training, a few hours of racing, 95ish percent of that time spent on “the process,” which you are trusting to deliver “the result.” 

But the process also—hopefully—delivers some nice views, a few really red-letter-day runs, some human moments you witness while you’re out there getting your heart rate up, a boost in your overall well-being several days per week, some good conversations with a friend who runs with you, and maybe a few moments of blissful gratitude that you can run at all. 

Writing a book—as much as writers complain about the actual act of writing—is, to me, the best part. Better than holding the first copy in my hands, better or the day it goes on sale, or seeing a copy on a shelf in a bookstore somewhere. When you’re doing the actual writing part, you’re still dreaming, experimenting, working things out, discovering the path it’s going to take, imagining it one day being an actual concrete thing that someone might hold in their hands, read, and maybe even dogear a page or two because you wrote something that feels true to them too. 

And maybe it’s the same with making your own pesto, or growing a decent tomato, or building a bicycle, or raising a child, or hiking uphill for hours just to stand on top of something for a handful of minutes: You give a chunk of the precious few hours of your life to something, imagining a great moment someday when it will all come together, and then when it does, you turn around and realize how many other great moments made up what you thought was “the process.”

If you enjoyed this piece, please consider supporting my work

  •  
❌