📘 CPU Reference Node – Active-Only Update Filtering

Purpose

  1. This MU plugin modifies WordPress update behaviour so that:

Only active plugins and themes are included in WordPress.org update checks.

Installed but inactive assets are excluded from routine update payloads.


Problem This Solves

On a reference server containing ~1800 installed plugins:

  • WordPress includes all installed plugins in update checks.

  • This creates very large request payloads.

  • Admin visits trigger delayed update checks (due to deferred WP-Cron).

  • Result: 3–4 second blocking delays in admin.

This is inefficient for a curated reference node where:

  • Only ~10 plugins are active at any time.

  • Installed ≠ in use.

  • Developer-triggered update checks should be fast and predictable.


Design Principle

Convert update behaviour from:

Installed assets = update burden

to:

Active assets = update burden

This aligns update cost with actual runtime state.


What The Plugin Does

Intercepts outbound HTTP requests to:

  • api.wordpress.org/plugins/update-check

  • api.wordpress.org/themes/update-check

And prunes payloads so they include:

Plugins

  • Only currently active plugins.

Plugin Translations

  • Only translations for active plugins.

Themes

  • Only active theme + parent theme.

Theme Translations

  • Only active theme + parent theme translations.


What It Does NOT Do

  • Does not disable updates.

  • Does not modify update transients.

  • Does not affect plugin activation.

  • Does not affect admin UI.

  • Does not affect front-end behaviour.

  • Does not touch core update logic.

  • Does not modify installed plugin registry.

  • Does not interfere with private plugin update systems.

It only reduces outbound payload size.


Performance Outcome

Before:

  • ~3–4 second admin update delay.

  • Large plugin payload (~1800 entries).

  • Repeated heavy update checks on admin access.

After:

  • Sub-1 second update page load.

  • Plugin update call reduced to ~500ms.

  • Translation and theme overhead reduced further.


Why This Is Safe

  • Scoped only to specific update endpoints.

  • Defensive decoding (JSON + serialized fallback).

  • Early return on unexpected formats.

  • Fully reversible (delete MU file).

  • No database schema changes.

  • No persistent side effects.


Intended Environment

This configuration is designed for:

  • Development / staging servers.

  • Curated plugin reference nodes.

  • Large asset repositories.

  • Low-traffic environments where WP-Cron is deferred.

It is not intended for general public production sites without review.


Future Considerations (Optional)

Possible future refinements:

  • Extend update transient lifetime on dev servers.

  • Trigger manual update checks on activation.

  • Add Update URI: false to private plugins.

  • Introduce scheduled batch scanning for inactive assets.

None of these are required for current stability.


Removal

To revert to stock WordPress behaviour:

  1. Delete the MU plugin file.

  2. Reload admin.

No further action required.

Categories: Uncategorized

Leave a Reply