You can’t fix what you don’t measure: a performance league table for WordPress

Dave Hilditch •

This is the last full week before Black Friday, which for a lot of stores means the last chance to change anything: a new plugin, an index someone recommended, a theme update. Every one of those can make a page slower as easily as faster, and the page it slows down is rarely the one you check afterwards. So measure before you change anything, and measure the pages your shoppers actually use.

I learned that the hard way years ago at Skyscanner, where I built something I called the Stored Procedure Performance League Table. The idea was simple: rank every stored procedure by its total cost. When a procedure started to hurt, it jumped up the table, and the team could see straight away which one it was.

I’ve thought about that table a lot this month, because almost every speed gain I got came from measuring rather than from clever code. Measuring a million-product store found a bug in my own plugin, another plugin’s indexes making filtered shop pages more than 20 times slower, a competitor winning where I didn’t, and one result that flattered my own plugin and turned out to be wrong.

Why a league table works

Ranking by total cost does two things for you. First, it tells you where to start: the thing at the top is the thing worth fixing, and it’s often not what you’d have guessed. Second, it catches regressions without anyone having to look for them. A procedure that was fine last month and is slow this month moves up the table, and that movement is the alert.

Without a table you’re relying on someone noticing that a page “feels slow”, and by then you’ve usually changed five things and can’t tell which one did it.

The WordPress version: Performance Analysis

WordPress doesn’t have stored procedures, but it has the same problem. A page is slow, and the cause could be any plugin, the theme, a missing index or WordPress itself. Super Speedy Performance Analysis is my league table for it. It’s free, and this is what it records:

  • For each of your key pages (front end, WooCommerce and wp-admin): generation time, SQL time, query count, rows returned, outbound HTTP time and peak memory.
  • Every query attributed to the plugin or theme that ran it, with the full SQL kept for the 20 slowest distinct queries per page.
  • Plugin Impact Analysis, which measures what each plugin really costs by re-measuring the page with that plugin disabled for the test requests only. Visitors still get the full site, and no plugin is actually deactivated.
  • A History tab where you pick two saved runs and compare them page by page. That’s the “who moved up the table” view.

Last week I pointed it at a WooCommerce store with a million products to compare Scalability Pro against Index WP MySQL For Speed. This is what the measurements found.

The test set-up

All the figures below are Performance Analysis median page generation times (one warm-up and three measured samples per page, warm second run) from the run on 9 November 2026. The box was our Hetzner test server (4 vCPU, 7.6 GB RAM), restored from the same snapshot for every phase:

  • 1,000,000 WooCommerce products in 425 categories.
  • WordPress 7.1.4, WooCommerce 11.1.2, MariaDB 10.11.17, PHP 8.2.34.
  • Default: WordPress and WooCommerce’s own database keys only.
  • Index WP MySQL For Speed 1.6.0 with its keys enabled on every table it supports.
  • Scalability Pro 6.41.1 with Enable good settings (wp spro recommended).

1. My own plugin was making a page slower

The first pass showed the shop filtered by colour (?filter_color=green) was slower with Scalability Pro than with no Scalability Pro at all. If I’d only measured the shop and the product pages, I’d never have known.

Performance Analysis gave me the query, so I could run it by hand. Scalability Pro removed GROUP BY wp_posts.ID from main queries that had no joins, which is a good optimisation for ordinary archive queries. WooCommerce’s attribute filter uses a subquery rather than a join, so it got caught by that rule too, and without the GROUP BY MariaDB picked a plan that read more than 900,000 rows. Same SQL, same database, same IDs returned, just a much worse plan.

I fixed that in Scalability Pro, and since it was now obvious this page mattered, I also added an index on WooCommerce’s attribute lookup table. With both in place (6.41.1 in the set-up above):

PageDefaultIndex WP MySQL For SpeedScalability Pro
Shop filtered by colour2,209 ms2,225 ms712 ms
Shop filtered by colour and size1,868 ms1,939 ms750 ms

I’d rather find that myself than have a customer find it for me.

2. The page nobody looks at

The RSS feed was one of the slowest pages on the site at 2.5 seconds. Nobody opens their own feed in a browser, but feed readers and bots request it all day. Measuring it showed two latest-post lookups doing the work, so I added two indexes to Scalability Pro for them:

PageDefaultIndex WP MySQL For SpeedScalability Pro
RSS feed2,552 ms660 ms96 ms

Index WP’s keys speed the feed up a lot too, to be fair to it.

3. Indexes can make things slower

This was the result I didn’t expect. I added two shop pages filtered by a numeric custom field (a meta_query on _stock between 1 and 5, and on _sale_price between 10 and 20) using a small benchmark mu-plugin:

PageDefaultIndex WP MySQL For SpeedScalability Pro
Shop, _stock 1 to 51,699 ms37,279 ms3,312 ms
Shop, _sale_price 10 to 20741 ms35,000 ms2,326 ms

The SQL is identical in every column. What changes is the plan. With Index WP’s postmeta keys, MariaDB chose a much worse route through the tables. And before anyone thinks I’m only pointing at the competition: Scalability Pro is slower than default here as well. Its (post_id, meta_key) index makes MariaDB walk all the products and look each one up, where without it MariaDB starts from the matching _stock rows. I haven’t fixed that one yet.

The lesson is that “add an index” is not automatically a speed boost. An index changes what the database optimiser chooses, and sometimes it chooses badly. The only way to know is to measure the pages that use it, before and after.

4. Where the other plugin wins

Measuring cuts both ways. On a second snapshot with 500,000 WooCommerce orders (HPOS on, same server), the wp-admin order search for “Smith” took about 18 seconds with default keys and 8.1 seconds with Index WP MySQL For Speed’s keys on the order meta table. Scalability Pro made no difference to it either way. That box’s database buffer pool is only 512 MB, so these multi-million-row searches are partly disk-bound and drift by a few seconds between runs, but 8.1 seconds is far outside that drift. It’s a real win for Index WP.

On edit product and new product in wp-admin the two plugins were level: about 1.6 seconds with default keys, and between 224 and 270 ms with either plugin.

The full page-by-page table, with every page including the ones where nothing changed, is on the Index WP MySQL For Speed vs Scalability Pro comparison.

5. A fast result that was wrong

Shop sorted by price, popularity or rating took about 4 seconds in every phase. Super Speedy Archives can store WooCommerce’s price, sales and rating columns in its own indexed table, so I configured it and measured again. The sorts got dramatically faster.

Then I checked what the pages actually returned. Price, popularity and rating sorts all returned the same products in the same order, sorted by date. With custom fields configured, that version of Archives was dropping WooCommerce’s ordering altogether. The pages were fast because they were wrong. I withdrew those figures the same day and fixed the ordering in Archives.

So when you measure, check the output too. A timing on its own only tells you something finished quickly, not that it did the right thing.

6. Order search with Super Speedy Search

While the 500,000-order snapshot was up I measured wp-admin order search with Super Speedy Search 5.96.2 against WooCommerce’s own order search (WordPress 7.1.4, WooCommerce 11.0.0, 41 searches taken from the snapshot’s own orders, timed on the server, one warm-up and three timed loads, median shown):

SearchWooCommerceSuper Speedy Search
Order number18.90 s0.36 s
Full email19.05 s1.23 s
Postcode17.74 s0.49 s
Surname (about 50,000 matches each)17.27 s4.34 s
All 38 distinct searches, median18.33 s0.66 s

Super Speedy Search was faster on all 38. The match counts aren’t identical in every case: WooCommerce matches an order number as a substring of other fields too (6 orders for one number, where Super Speedy Search found the 1 order with that number), and for two-word product names Super Speedy Search matches the words separately where WooCommerce matches the phrase.

I’m also part way through a 10,000-product comparison of Super Speedy Search against FiboSearch, Advanced Woo Search and Relevanssi, and I’ll write that up properly once it’s finished. One honest result from it already: in that test FiboSearch Pro showed its suggestions sooner after the last keystroke than Super Speedy Search did, partly because of the 200 ms keyboard delay I run Super Speedy Search with. That’s exactly the kind of thing you only learn by measuring.

How to build your own league table

  1. Measure before you change anything. Run a Performance Analysis baseline so you have something to compare against.
  2. Add the pages your customers actually use. Filtered shop pages, sorted shop pages, deep pagination, the feed and the wp-admin screens your staff live in. My GROUP BY problem only showed up on a filtered shop page.
  3. Change one thing, then measure again. Compare the two runs on the History tab. Anything that moved the wrong way is your regression.
  4. Compare runs taken close together. On my test box, disk-bound pages drifted by about 15% over an hour. Measure before and after back to back, and treat pages under 300 ms moving by a few tens of milliseconds as noise.
  5. Check the page is still right. Same products, same order, same count. A fast wrong page isn’t a win.

Summary

  • Rank everything by cost and watch what moves up. That was the point of my old stored procedure league table, and it’s the point of Performance Analysis now.
  • On a million products, measuring found a Scalability Pro bug on filtered shop pages and a slow RSS feed. With the fixes, the colour filter went from 2,209 ms to 712 ms and the feed from 2,552 ms to 96 ms.
  • Indexes can make pages slower. Custom-field filters were slower with both Index WP MySQL For Speed and Scalability Pro than with no extra indexes at all.
  • Index WP MySQL For Speed more than halves HPOS order search on 500,000 orders; Scalability Pro doesn’t touch it. Super Speedy Search took the median wp-admin order search from 18.33 s to 0.66 s on the 500,000-order snapshot.
  • Always check the output as well as the timing.

Comments