Plugin sales are slowing, so I’m selling an AI loop

Dave Hilditch •

I’m having to pivot the business. Plugin sales are slowing as people turn to Claude for everything. If you can describe a small plugin to an AI and have it written in an afternoon, you’re less likely to go looking for one to buy, and I don’t blame anybody for that (I do it myself).

But there are still incredibly challenging things, where getting the AI to write the code is the easy part. This post is about one of them, and about the experiment I’m running to sell it: a lifetime plugin licence, plus an AI skills kit, plus the testing and the stop switch an AI needs to work through the problem on its own.

The hard problem: cached pages for shoppers with a basket

Page caching on WooCommerce works well for visitors who haven’t done anything yet. As soon as someone adds an item to their basket, or logs in, most caching set-ups stop serving them cached pages, because the page now holds things that belong to that one person: their basket count, their name, sometimes their prices. Every page they visit after that gets built from scratch by PHP and the database.

On a real WooCommerce store I measured, adding one item to the basket made pages about 28 to 32 times slower (0.08 s to 2.1-2.4 s). And those are the shoppers who’ve just shown you they want to buy something.

It gets worse when lots of them arrive at once, which is exactly what Black Friday is for. On our 4-core test server, a product page took 0.2 s for one shopper with a basket. With 20 basket shoppers requesting it at the same moment, the typical one waited 1.4 s and the slowest 2.3 s, because the server builds about 4 pages at a time and the rest wait their turn.

The fix sounds simple. Cache the page anyway, then fill in the personal bits for each visitor afterwards. That’s what Super Speedy AJAX Prices and its cache add-on do. The hard part is doing it safely. Get it wrong and one customer sees another customer’s basket, name or price, which is a far worse problem than a slow page.

One week planned, four weeks actual

When I first did this as a done-for-you service, I aimed to have the initial versions done within a week. Actually, 4 weeks was how long it took to get the recipes right, and that was with AI doing a lot of the work.

A recipe is a small PHP file, one per plugin, that keeps that plugin’s personal output out of the shared cached page and puts it back for each visitor. Every store runs a different set of plugins, and every one of them is a chance to leak something. On a WooCommerce store I worked on, the checks caught things like these:

  • an analytics plugin writing the shopper’s basket contents into the page’s tracking data
  • a payment plugin’s script settings carrying values that belong to one visitor
  • a marketing pixel setting a cookie in the page response, which a shared cache would then hand to everyone

None of those show up when you look at the page. You only find them by testing.

I didn’t have the loop perfected, but even then it was back and forward 30 or 40 times to work through the test, failure, retest loop. Run the safety checks on staging. Read the report. Work out which plugin caused each failure. Write or fix a recipe. Build the add-on, upload it to staging, run the checks again. Sometimes a fix in one place brought back a failure that had passed the day before, so the whole set had to pass together, every time, before I’d trust any of it.

What a loop needs to work

The loop itself isn’t new. Giving an agent the same task over and over until a check passes is a well-known technique, and the tooling for it is free. Everyone who writes about it says the same thing: without a hard stop condition, something that tells the agent it’s finished (or that it isn’t), the loop goes round forever.

That’s where my 4 weeks went. Writing a recipe is something Claude does well. Knowing whether the recipe is right is the hard bit, so most of the effort went into the safety checks, and into making them produce evidence an agent can read and act on. Each finding is a FAIL (unsafe behaviour was seen), UNRESOLVED (something required couldn’t be measured) or WARN (worth a look, doesn’t block), and a run only counts as green with no fails and nothing unresolved.

The other thing a loop running on a real shop needs is a stop switch. There’s one action that puts the site straight back to normal WordPress, without logging anybody out or emptying anybody’s basket, and the agent is told to use it the moment the live site misbehaves.

The experiment: selling the loop

So rather than only selling the service, I’m now selling the kit I’d use myself. The Cache Upgrader Kit for WooCommerce is a one-off purchase for one site, and it includes:

  • a lifetime 1-site licence for Super Speedy AJAX Prices, which everything else is built on
  • the Cache Upgrader plugin, with a library of 30 recipes for plugins that have already been through the loop, so your AI doesn’t have to build those itself
  • the skills: an AGENTS.md file and instructions your own AI agent follows to set things up, run the safety checks on your staging site, write recipes for whatever’s missing, and keep going until the run is green
  • the safety checks, which are the stop condition, and the switch that turns caching off again

Your agent works to a few ground rules. Staging first, always. It never edits another plugin or your theme; the recipes it writes go into a plugin of their own. It never makes a check pass by weakening the check. And you, the owner, are the one who turns caching on. The agent makes it safe and tells you it is.

Your AI does the 30 or 40 rounds instead of me. It still takes some patience, because it’s a real loop and not a button, but you don’t need to be a developer to sit with it while it works.

It’s an experiment, and I’ll be honest that I don’t know how it’ll go. I don’t know yet whether store owners would rather buy the kit and run the loop with their own AI, or pay me to run it for them. If you’d rather I did it, the done-for-you service is still there.

Summary

  • Plugin sales are slowing because people get AI to write the simple stuff. The hard problems are still hard.
  • Safe caching for shoppers with a basket took 4 weeks to get right, not the week I’d planned, with 30 or 40 rounds of test, fix and retest, and that was with AI.
  • I’m selling that loop as a kit: a lifetime licence, the skills your AI follows, the safety checks that tell it when it’s done, and the switch that turns it all off. It’s the Cache Upgrader Kit for WooCommerce.

Comments