Repository navigation
enhancement: add a shutdown row to the phases - #119
Merged
Merged
Conversation
All sites of a network share mu-plugins, so deactivating the plugin on one site removed the loader for every site. Keep the file while the plugin is network-active or active on another site. Fixes #108 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show the seconds and the total time in each option, so reports of the same page saved in the same minute look different. Fixes #109 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a table of the 20 slowest hook callbacks by self time, with the hook, priority, source, file and line, and calls. Fixes #110 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record a shutdown phase from the shutdown mark until the report is saved, so the phases add up to the saved total. Fixes #111 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
mukeshpanchal27
changed the base branch from
enhancement/110-slowest-callbacks
to
trunk
November 18, 2026 14:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #111.
Stacked on #118.
Problem
In an early review, the saved total was 7 to 12 ms higher than the phases on every run, for example 86.0 vs 75.9 ms. The gap was work during
shutdown, such as Query Monitor's output, and no phase row showed it. The "Share of total" column added up to about 88%.Change
Phase_Timer::record_shutdown()runs onshutdownatPHP_INT_MAX - 1, just before the report is saved. It adds ashutdownphase, from theshutdownmark to that moment. The row shows asshutdown → report.The header:
Server-Timinggoes out at the start ofshutdown, before the page is flushed, so it cannot include this phase. It is unchanged. Only the saved report has the shutdown row.Testing
On the wp-env dev site, the phases now add up to the saved total within 0.1 ms:
//sample-page//wp-admin//sample-page/, with a test plugin that waits 7 ms onshutdownThe header still lists the phases up to
wp_loadedortemplate_redirect, pluslp-overhead, and no shutdown metric.PHPCS passes.
🤖 Generated with Claude Code