Skip to content

Instantly share code, notes, and snippets.

View westonruter's full-sized avatar

Weston Ruter westonruter

View GitHub Profile

Prompt:

ok, so I've used SPX to obtain profiling for the homepage in WP 6.9 and WP 7.0. For 6.9, I'm seeing the report at http://localhost:8869/?SPX_UI_URI=/report.html&key=spx-full-20260428_175015-a4ba424a004a-56-1804289383 and for 7.0 I'm seeing it at http://localhost:8870/?SPX_UI_URI=/report.html&key=spx-full-20260428_175011-83e23fa31a20-70-1714636915
I understand that the data is available in the /tmp/spx directory in the containers for each environment. I want you to analyze them to determine the primary reasons why WP 7.0 is slower than WP 6.9

Claude Opus 4.7 response:

Big-picture numbers:

| Metric | wp69 | wp70 | Ξ” |

PHPStan performance in wordpress-develop: avoid pointing scanDirectories at directories containing vendor/ or node_modules/

Symptom

composer phpstan slow; PhpStorm's on-the-fly PHPStan inspection lags badly (many seconds per save).

Root cause

PHPStan walks every .php file under each entry in scanDirectories to build its symbol table. If an entry contains vendor/ or node_modules/, every third-party file gets parsed on every run.

<?php
/**
* Plugin Name: Expose All Abilities to MCP
* Plugin URI: https://gist.github.com/westonruter/3a37d35ef66cdd58315a7c1347d92560
* Description: Forces all registered abilities (wth the Abilities API) to be exposed to AI agents, only when running on a local environment.
* Requires at least: 6.9
* Requires PHP: 7.4
* Version: 1.1.1
* Author: Weston Ruter
* Author URI: https://weston.ruter.net/
<?php
/**
* Cache WP AI Generate Responses Plugin for WordPress
*
* @package CacheWpAiGenerateResponses
* @author Weston Ruter
* @license GPL-2.0-or-later
* @copyright Copyleft 2026, Weston Ruter
*
* @wordpress-plugin

This is combined list of CodeMirror v5 changes across all 76 releases (5.30.0 through 5.65.18) which are included in WordPress 7.0 due to #48456. Gathered by Claude Code with Opus 4.6.


Bug fixes (282 items)

Core editor

  • [5.65.16] Fix focus tracking in shadow DOM.
  • [5.65.9] Add a workaround for a regression in Chrome 105 that could cause content below the editor to not receive mouse events.
  • [5.65.8] Include direction override and isolate characters in the default set of special characters.
--- before.txt 2026-02-28 11:28:52
+++ after.txt 2026-02-28 11:43:42
@@ -9,12 +9,6 @@
string, false given.
πŸͺͺ argument.type
at src/wp-activate.php:40
- 55 Cannot call method get_error_code() on array|WP_Error.
- πŸͺͺ method.nonObject
- at src/wp-activate.php:55
- 58 Cannot call method get_error_code() on array|WP_Error.
@westonruter
westonruter / symlink-js-enqueues.sh
Created January 28, 2026 06:38
Using symlinks to bypass having to run build:dev in wordpress-develop
@westonruter
westonruter / README.md
Last active December 19, 2025 20:32
Test plugin to ensure that a stylesheet enqueued in the footer will get printed and moved to the head in WordPress 6.9. See https://wordpress.org/support/topic/wordpress-6-9-broke-site-layout-crewbloom/page/3/#post-18758001
#late-enqueued-style-info {
position: fixed;
bottom: 0;
right: 0;
padding: 1em;
}
@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