Skip to content

Release 1.7.0: rename to AAA Autoload Optimizer - #83

Merged
jdevalk merged 3 commits into
developfrom
filip/release-1.6.2
Oct 15, 2026
Merged

jdevalk merged 3 commits into
developfrom
filip/release-1.6.2

Conversation

@ilicfilip

@ilicfilip ilicfilip commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

What this does

Prepares the 1.7.0 release: renames the plugin to AAA Autoload Optimizer, bumps the version and fixes two readme headers. Apart from the name strings, there are no code changes in this PR. The rest of the code in the release is what's already on develop since 1.6.1:

Changes

  • Rename to "AAA Autoload Optimizer" (decided in today's meeting). Rename plugin + readme optimization #76 renamed the headers to "Autoload Optimizer", but the admin page, README.md, known-plugins.json and docblocks still said "AAA Option Optimizer". All of them now say "AAA Autoload Optimizer", and the Tools menu label is "Autoload Optimizer". The slug, text domain, option names and namespaces stay the same.
  • Version / Stable tag / package.json → 1.7.0 (it was 1.6.2 before the rename), with a 1.7.0 changelog entry and upgrade notice. package.json had been stuck at 1.3.2.
  • Requires at least: 6.4 → 6.7. Rename plugin + readme optimization #76 lowered it from the 6.7 that 1.6.1 shipped with. The plugin calls wp_autoload_values_to_autoload() (added in WP 6.6) unguarded in activation, the admin page and the REST endpoints, so WP 6.4/6.5 sites would be offered an update that fatals.
  • Tested up to: 7.0 → 7.1. 7.1 is the current WordPress release; Plugin Check reports 7.0 as an error.

Testing

All tests ran on a local site (WP 7.1.3, MySQL 8.0, PHP 8.3) unless noted.

Deadlock fix (src/class-database.php)

  • Stress test: 20 parallel processes × 50 batch_insert() calls of 200 shuffled options.
    • v1.6.1 code: 24,800 / 200,000 increments landed. About 88% of batches were lost, and none of them reported an error.
    • This release: 200,000 / 200,000.
  • 300 concurrent front-end requests (pre_option mode) and 100 (legacy mode): no lost counts and no deadlocks in debug.log.
  • Retry path: I forced a real InnoDB deadlock where the plugin transaction was the victim. It got ROLLBACK, one retry, COMMIT, and each row went up by exactly +1, so nothing was double counted.
  • Edge-case option names (%d/%s, quotes, backslash, emoji, numeric, case-only duplicates) all write correctly.
  • Missing tracking table: the front end still returns 200 and the failed write is logged once, with no fatal.

W3 Total Cache fix

  • W3TC 2.10.5 with DbCache on ($wpdb is W3TC\DbCache_WpdbNew): 60 concurrent requests all returned 200, there were no fatals, and tracking still writes.

Rename (1.7.0)

  • PHP lint, PHPCS and PHPStan pass. wp plugin list shows "AAA Autoload Optimizer 1.7.0".
  • No "Option Optimizer" strings remain outside the slug and text domain.
  • Admin page in the browser: the page title and heading read "AAA Autoload Optimizer", the Tools menu reads "Autoload Optimizer", the options table loads, and the console is clean.
  • The tests below ran on the 1.6.2 code, before the rename.

Regression checks

  • Migration from the old option format: done via REST (2,501 options, 3 chunks, exact totals, existing rows merged) and via the admin UI (1,500 options).
  • REST endpoints: all list and write endpoints work for an admin. Logged-out requests get 401, subscribers get 403, and requests without a nonce get 403.
  • Admin UI in the browser: every tab renders, and search, Remove autoload, Delete and bulk Delete all work. The console was clean and every REST call returned 200.
  • Activation, deactivation, Reset, Uninstall (drops the table and option) and reactivation all work.

Static and packaging checks

  • PHP lint, PHPCS, PHPStan, and the blueprint/known-plugins JSON checks pass. PHPCompatibilityWP (7.4+) is clean, and lint is clean on PHP 8.1 and 8.5.
  • Plugin Check on the build that would ship: after these header fixes, only existing or false-positive warnings remain. src/autoload.php lacks an ABSPATH guard (unchanged since 1.6.1), and the "unescaped DB parameter" warnings are all table names built from constants or SQL that is already prepared.
  • Build simulation (git archive + .distignore): same file list as the 1.6.1 zip on WordPress.org. The only shipped code diff is src/class-database.php.

Not covered

  • Running the code on PHP 7.4. The local 7.4 binary is broken, so 7.4 was checked statically only.

Follow-ups (not in this PR)

  • composer audit: squizlabs/php_codesniffer CVE-2026-67434. It's a dev-only dependency and not shipped. Needs a bump to 3.13.6+.
  • playground-merged.yml has failed on every run since at least September with a workflow-file error.
  • Existing npm run lint:js prettier error at js/admin-script.js:654.

🤖 Generated with Claude Code

- Version 1.6.2 in the plugin header, readme Stable tag and package.json.
- Changelog: deadlock fix, W3 Total Cache DbCache fix, readme improvements.
- Restore "Requires at least: 6.7". The readme rework lowered it to 6.4, but
  the plugin calls wp_autoload_values_to_autoload() (WP 6.6+) unguarded, so
  WP 6.4/6.5 sites would be offered an update that fatals.
- "Tested up to: 7.1" (current WordPress; Plugin Check flags 7.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Test on Playground
Test this pull request on the Playground
or download the zip

ilicfilip and others added 2 commits October 12, 2026 11:19
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Plugin name, readme title and all user-facing strings: "AAA Autoload
  Optimizer". #76 had renamed the headers to "Autoload Optimizer"; the admin
  page, README.md, known-plugins.json and docblocks still said "AAA Option
  Optimizer". The Tools menu label is now "Autoload Optimizer".
- Slug, text domain, option names and PHP namespaces are unchanged.
- Version 1.6.2 -> 1.7.0 (plugin header, Stable tag, package.json,
  changelog, upgrade notice). The rename is a minor-version change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ilicfilip ilicfilip changed the title Release 1.6.2 Release 1.7.0: rename to AAA Autoload Optimizer Oct 15, 2026
@ilicfilip

Copy link
Copy Markdown
Collaborator Author

Renames beyond #76

#76 renamed the plugin only in the Plugin Name header and in readme.txt (the title, the intro, and "Search for…"). Those places now say AAA Autoload Optimizer. 30420bb also renames these:

Visible to users (translatable strings in src/class-admin-page.php)

  1. Browser tab page title: "AAA Option Optimizer" → "AAA Autoload Optimizer"
  2. Tools menu label: "Option Optimizer" → "Autoload Optimizer"
  3. Page heading: "AAA Option Optimizer" → "AAA Autoload Optimizer"
  4. The help texts at the top of the "Unused, but autoloaded", "Used, but not autoloaded" and "Requested options that do not exist" tabs: "…but AAA Option Optimizer has…" → "…but AAA Autoload Optimizer has…"

Readme
5. readme.txt: "Go to Tools → Option Optimizer" → "Tools → Autoload Optimizer". #76 added this line with the old menu name. It now matches the new menu label.

Repo and data files
6. README.md: heading "AAA Option Optimizer" → "AAA Autoload Optimizer"
7. known-plugins/known-plugins.json: the plugin's own entry name. Its options now show the new name in the Source column.
8. .github/ISSUE_TEMPLATE/suggest-plugin-s-option-prefix.md: the about: text

Internal only, not shown to users
9. phpcs.xml.dist: ruleset name and description
10. File and class docblocks in class-admin-page.php, class-database.php, class-plugin.php and class-rest.php

Unchanged: the slug aaa-option-optimizer, the text domain, option and table names, constants, and PHP namespaces.

Translations: items 1–4 show in English until their translations are updated.

@ilicfilip
ilicfilip requested a review from tacoverdo October 15, 2026 10:52
@ilicfilip
ilicfilip marked this pull request as ready for review October 15, 2026 11:11
@ilicfilip
ilicfilip requested a review from jdevalk October 15, 2026 11:12
@jdevalk
jdevalk merged commit 037e72b into develop Oct 15, 2026
8 checks passed
jdevalk added a commit that referenced this pull request Oct 15, 2026
* Fix W3 Total Cache DbCache fatal in batch_insert

W3TC's DbCache wrapper reads `$wpdb->col_info` after each cacheable
query, which triggers `wpdb::load_col_info()` -> `mysqli_num_fields()`.
For non-SELECT queries the result is `true` (bool), so this fatals
with "Argument #1 ($result) must be of type mysqli_result, true given".

W3TC bypasses caching for write queries via a regex that matches
`START TRANSACTION`, `INSERT`, `COMMIT`, etc. — but not `BEGIN`.
Switching `BEGIN` to `START TRANSACTION` (semantically identical in
MySQL) lets W3TC's regex catch it and skip the col_info path.

Reproduced locally with W3TC 2.9.4: identical stack trace with `BEGIN`,
no fatal with `START TRANSACTION`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Improve the readme (#76)

Co-authored-by: Filip Ilić <ilic.filip@gmail.com>

* Update WPCS to 3.4.1 (security release)

Updates wp-coding-standards/wpcs to 3.4.1, which fixes a security issue
in the WordPress.WP.EnqueuedResourceParameters sniff where running PHPCS
over untrusted PHP code could lead to arbitrary command execution on the
scanning host (GHSA-3pwp-g2mj-5p3v).

Also bumps the required transitive dependencies:
- phpcsstandards/phpcsutils to 1.2.3
- phpcsstandards/phpcsextra to 1.5.1

Lock-file only; composer.json constraints already allowed 3.4.1.
Verified locally with PHPCS: no new violations.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Signed-off-by: Filip Ilic <ilic.filip@gmail.com>

* Fix deadlocks when concurrent requests write tracked options

Every request writes the options it read to wp_option_optimizer_tracked
on shutdown with INSERT ... ON DUPLICATE KEY UPDATE. InnoDB locks rows in
VALUES order, which followed per-request access order, so concurrent
requests locked the same rows in different orders and deadlocked
("Deadlock found when trying to get lock"), losing that request's counts.

Sort the options before writing so all writers lock in one order. On a
failed insert, ROLLBACK instead of sending COMMIT (which also hid the
error by clearing $wpdb->last_error), and retry once on a deadlock; the
deadlock rolls back the whole transaction, so the retry can't double count.

Reproduced locally with 20 parallel writers x 50 batch_insert() calls of
200 shuffled options: ~920/1000 deadlocks before, 0/1000 after with all
200000 increments landed. Retry path verified with a forced deadlock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update PHPStan to 2.3

PHPStan 1.12 to 2.3, with szepeviktor/phpstan-wordpress 1.3 to 2.0 (which brings WordPress stubs 6.9 to 7.1). The code needed no changes. Two config entries did:

- excludePaths: tests does not exist in this repository, which PHPStan 2 refuses; marked optional as tests (?).
- The ignore for missingType.generics matched nothing on PHPStan 2 and is reported as unused; removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Filip Ilic <ilic.filip@gmail.com>

* Release 1.7.0: rename to AAA Autoload Optimizer (#83)

* Bump version to 1.6.2

- Version 1.6.2 in the plugin header, readme Stable tag and package.json.
- Changelog: deadlock fix, W3 Total Cache DbCache fix, readme improvements.
- Restore "Requires at least: 6.7". The readme rework lowered it to 6.4, but
  the plugin calls wp_autoload_values_to_autoload() (WP 6.6+) unguarded, so
  WP 6.4/6.5 sites would be offered an update that fatals.
- "Tested up to: 7.1" (current WordPress; Plugin Check flags 7.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add 1.6.2 upgrade notice

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Rename plugin to AAA Autoload Optimizer and release as 1.7.0

- Plugin name, readme title and all user-facing strings: "AAA Autoload
  Optimizer". #76 had renamed the headers to "Autoload Optimizer"; the admin
  page, README.md, known-plugins.json and docblocks still said "AAA Option
  Optimizer". The Tools menu label is now "Autoload Optimizer".
- Slug, text domain, option names and PHP namespaces are unchanged.
- Version 1.6.2 -> 1.7.0 (plugin header, Stable tag, package.json,
  changelog, upgrade notice). The rename is a minor-version change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Update banners for the AAA Autoload Optimizer rename

- New WordPress.org banners (772x250, 1544x500) with the new name.
- Add Dutch banners as banner-*-nl_NL.png, the locale naming WordPress.org
  uses for localized assets.
- Replace github_banner_aaaoo_pp.png with github_banner_aaaao_pp.png and
  point README.md at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Joost de Valk <joost@altha.nl>
Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants