Repository navigation
perf: avoid redundant admin statistics counts - #1155
Merged
mostafasoufi merged 3 commits intoOct 9, 2026
Merged
mostafasoufi merged 3 commits into
mostafasoufi merged 3 commits into
Conversation
mostafasoufi
marked this pull request as ready for review
October 9, 2026 06:08
Member
|
Thanks for this, the change is clean and the numbers check out: the second We moved the PR to |
mostafasoufi
added a commit
that referenced
this pull request
Oct 9, 2026
Contributor
Aria QA — completeVerdict: No net-new correctness, security, or regression issues. No follow-up commit was needed. What I verified
Fixed
Deliberately left
Author decision needed
I did not merge or approve the PR. |
Merged
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.
Summary
Avoid two forms of redundant metric work, without adding a persistent cache:
src/Service/Admin/Posts/HitColumnHandler.php: total-view mode currently callscountViewsFromPagesOnly()twice and overwrites the first result. Call only the historical-aware branch in total mode, preserving its arguments and output. Other view modes and visitor counts are unchanged.includes/class-wp-statistics-admin-bar.php: reuse this render's online/today/yesterday metrics between the toolbar HTML andwp_statistics_admin_barfilter data. Each metric is resolved once rather than twice; formatting and filter arguments are unchanged.Verification
master(38e82ae, 14.16.15).php -l;git diff --checkpasses.Full WordPress PHPUnit suite was not run. Configured PHPCS reports extensive existing formatting violations in these files; a clean lint result is not claimed. No generated assets, scratch reports or test infrastructure are included. Draft for maintainer review.
aidevops.sh v3.34.13 plugin for OpenCode v1.18.31 with gpt-6.1-sol