Skip to content

Instantly share code, notes, and snippets.

View westonruter's full-sized avatar

Weston Ruter westonruter

View GitHub Profile
@westonruter
westonruter / README.md
Created November 17, 2025 17:31
Benchmarking web vitals for the "Block category: Common" with all the core themes in WordPress 6.8 versus 6.9-RC1
@westonruter
westonruter / README.md
Created November 16, 2025 00:12
Benchmarking web vitals for the Sample Page with all the core themes in WordPress 6.8 versus 6.9-RC1
@westonruter
westonruter / README.md
Last active November 18, 2025 06:20
WordPress 6.9 Performance Improvments

πŸ‘‰ Dev note published: WordPress 6.9 Frontend Performance Field Guide


I'm working on a Dev Note which will detail all of the performance improvements in WordPress 6.9. See full list in Trac. In the mean time, here are a couple outlines:

Links below either point to a specific ticket or a Trac query for the group of tickets:

4-bullet highlights

The two sites are running on LocalWP with PHP 8.2, MySQL 8, Nginx. They both have the theme unit test data installed. The Twenty Twenty-One theme is active. In the Customizer, the theme is configured to show full content instead of excerpts on archive pages.

benchmark-server-timing on Sample Page

npm run research -- benchmark-server-timing --url=http://wp68.local/sample-page/ --url=http://wp69beta4.local/sample-page/ --number=100 --diff --output=md
URL http://wp68.local/sample-page/ http://wp69beta4.local/sample-page/ Diff (ms) Diff (%)

The two sites are running on LocalWP with PHP 8.2, MySQL 8, Nginx. They both have the theme unit test data installed. The Twenty Twenty-Five theme is active.

benchmark-server-timing on Sample Page

npm run research -- benchmark-server-timing --url=http://wp68.local/sample-page/ --url=http://wp69beta4.local/sample-page/ --number=100 --diff --output=md
URL http://wp68.local/sample-page/ http://wp69beta4.local/sample-page/ Diff (ms) Diff (%)
@westonruter
westonruter / 68-sample-page.diff
Last active October 29, 2025 01:03
Showing the Twenty Twenty theme with and without wp-block-styles them support in 6.8 and 6.9-beta2. See https://core.trac.wordpress.org/ticket/64166
--- 68-sample-page-without-theme-support.html 2025-10-28 17:56:40
+++ 68-sample-page-with-theme-support.html 2025-10-28 17:56:40
@@ -521,6 +521,179 @@
href="http://localhost:8000/wp-includes/css/dist/block-library/style.css?ver=6.8.3-src"
media="all"
/>
+ <style id="wp-block-library-theme-inline-css">
+ .wp-block-audio :where(figcaption) {
+ color: #555;
+ font-size: 13px;

As of 6.9-beta1:

Size (Bytes) File Path
19126 ./cover/style.min.css
16879 ./navigation/style.min.css
16120 ./gallery/style.min.css
11762 ./social-links/style.min.css
6758 ./image/style.min.css
3888 ./table/style.min.css
@westonruter
westonruter / benchmark.sh
Last active October 12, 2025 05:40
WordPress Theme Performance Benchmarking Script
#!/bin/bash
# =============================================================================
#
# WordPress Theme Performance Benchmarking Script
#
# This script automates the process of benchmarking the performance impact of a
# change across multiple WordPress themes. It activates each theme, runs
# Lighthouse multiple times for a "before" and "after" URL, calculates the
# median performance score, and outputs the results in a Markdown table.
<?php
/**
* Plugin Name: Active Plugins Override
* Description: Install this as an mu-plugin to override the active plugins via query parameters.
* Plugin URI: https://gist.github.com/westonruter/9c791f4f8cc1cc37e7b3f4bc2db9be97
* Requires PHP: 7.2
* Version: 0.1.0
* Author: WordPress Performance Team
* Author URI: https://make.wordpress.org/performance/
* License: GPLv2 or later