Skip to content

docs: record footprint and performance metrics#67

Merged
dknauss merged 4 commits into
mainfrom
docs/footprint-performance-metrics
Jul 6, 2026
Merged

docs: record footprint and performance metrics#67
dknauss merged 4 commits into
mainfrom
docs/footprint-performance-metrics

Conversation

@dknauss

@dknauss dknauss commented Jul 5, 2026

Copy link
Copy Markdown
Owner

What

Puts the plugin's size and runtime overhead on record and surfaces the headline figures in both readmes.

  • New docs/current-metrics.md — hand-verified metrics reference. Every number carries the exact command to re-derive it (LOC, installed storage footprint, runtime query overhead), plus the persistence-audit grep that should return NONE.
  • README.md — new "Footprint & Performance" section with a table, linking to the metrics doc.
  • readme.txt — new "Performance & Footprint" section in WordPress.org list format (no markdown tables, which the WP.org parser mangles).

Headline numbers (verified against main @ 49f623b)

Metric Value
Main plugin file 1,881 LOC (single PHP file)
JS source (src/) 8,851 LOC
Front-end runtime shipped to visitors view.js ~1.4 KB + style-index.css ~2.9 KB, only when the block is present
Installed footprint ~2.2 MB (citeproc-php ~1.0 MB, translations 724 KB, assets 328 KB, curated CSL styles 60 KB)
Distributed ZIP ~0.9–1 MB compressed
Added DB queries per page 0 — independent of block/citation count
Options / cron / custom tables / CPTs / render_callback none

The static save() architecture (no render_callback) is why the visitor path adds zero queries and zero server-side formatting — all citeproc + Crossref/NCBI work is editor-only.

Risk

Docs-only, no code touched. Reviewer agent re-derived every measurable figure (all exact matches) and confirmed the three files are internally consistent. vendor/ release-build sizes (~1.0 MB pruned, ~2.2 MB total) aren't installed in the working tree but each carries a re-derivation command and is consistent with the measured components.

🤖 Generated with Claude Code

Add a hand-verified metrics reference (docs/current-metrics.md) with
re-derivation commands for LOC, installed storage footprint, and runtime
query overhead. Surface the headline figures in a README.md table and a
readme.txt "Performance & Footprint" section.

Key facts recorded: static save() output means zero added DB queries per
page (no render_callback, options, cron, custom tables, or CPTs), ~2.2 MB
installed footprint, and a ~1.4 KB front-end runtime.

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

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.80%. Comparing base (49f623b) to head (863a6d8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #67   +/-   ##
=======================================
  Coverage   80.80%   80.80%           
=======================================
  Files          44       44           
  Lines        3084     3084           
  Branches      523      523           
=======================================
  Hits         2492     2492           
  Misses        185      185           
  Partials      407      407           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c33fd45617

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/current-metrics.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR records and surfaces the plugin’s footprint/performance characteristics by adding a canonical metrics document and summarizing the headline numbers in both GitHub and WordPress.org readmes.

Changes:

  • Added docs/current-metrics.md with re-derivation commands for LOC, installed footprint, and runtime/query overhead.
  • Added a “Footprint & Performance” section to README.md (GitHub) with a metrics table and link to the canonical doc.
  • Added a “Performance & Footprint” section to readme.txt (WP.org) describing the same runtime/footprint story in WP readme format.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
readme.txt Adds WP.org-formatted performance/footprint section describing static save() output and headline metrics.
README.md Adds GitHub “Footprint & Performance” section with a summary metrics table and link to the metrics doc.
docs/current-metrics.md New canonical, command-backed metrics reference for LOC, installed size, and runtime/query overhead.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/current-metrics.md Outdated
Comment thread docs/current-metrics.md Outdated
Comment thread readme.txt Outdated
Comment thread README.md Outdated
Address automated review on PR #67 (Codex P2 + Copilot):

- wp_options: the editor-time cache (bibliography_builder_cache_set)
  falls back to non-autoloaded, expiring _transient_bbb_* rows when no
  persistent object cache is present. Narrow the "0 rows / no persistent
  storage / creates no options" wording to "no autoloaded options / no
  long-lived settings" and document the editor-only transient fallback.
  The frontend "0 added queries per page" claim is unchanged and correct.
- packages/ is not a separate shipped component: package-release.sh
  rm -rf's the staged packages/ after Composer installs those path
  packages into vendor/citation-style-language/*. Fold the 60 KB into
  the vendor/ figure; installed total corrected ~2.2 MB -> ~2.1 MB.

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

dknauss commented Jul 6, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e619e30a1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/current-metrics.md Outdated
Comment thread README.md Outdated
Comment thread docs/current-metrics.md Outdated
Address Codex re-review P3 notes on PR #67:

- The editor-time cache calls both wp_cache_set() and set_transient()
  unconditionally (two independent function_exists guards), not an
  object-cache-else-transient fallback. With a persistent object cache
  no wp_options row is written; without one, set_transient() materializes
  the non-autoloaded _transient_bbb_* rows. Reword the caveat to match.
- DOI imports are deduped in a browser-session JS Map (src/lib/parser.js),
  not the PHP object/transient cache (only the formatter and pmid groups
  exist server-side). Drop DOI from the server-side caching claim in both
  readmes and note the browser-session dedupe instead.

The first-party PHP LOC (1,982) is unchanged: the documented command
counts the three generated build/*.asset.php stubs.

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

dknauss commented Jul 6, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread docs/current-metrics.md Outdated
Comment thread docs/current-metrics.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dec30ba15c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/current-metrics.md Outdated
Comment thread docs/current-metrics.md
Address Codex re-review P3 notes on PR #67:

- build/ is gitignored (produced by npm run build), so counting it made
  the first-party PHP LOC environment-dependent: 1,982 in a built tree
  vs 1,979 on a clean checkout (the three generated build/*.asset.php
  stubs). Exclude build/ from the LOC command for a stable 1,979.
- package-release.sh copies the gitignored build/, so the installed
  footprint recipe fails on a clean checkout without building first.
  Add an explicit `npm run build` prerequisite, and to the view.js row.

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

dknauss commented Jul 6, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 863a6d82e2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread README.md
@dknauss dknauss merged commit 8e6f800 into main Jul 6, 2026
17 checks passed
@dknauss dknauss deleted the docs/footprint-performance-metrics branch July 6, 2026 01:00
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