WP Manifestindependent plugin directory
manifest / performance / cedenodev_wp_script_cleaner

Cedeño Dev: Script Cleaner

Cedeño Dev: WP Script Cleaner - Surgical WPO tool to optimize JS/CSS loading in WordPress.

by Christian Cedeño · github.com/chrisx27/cedenodev_wp_script_cleaner · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/chrisx27/cedenodev_wp_script_cleaner/archive/refs/heads/main.zip

Cedeño Dev: WP Script Cleaner

Surgical WordPress performance tooling to control which scripts and styles load on the front page—without touching the rest of the site.


Purpose

WP Script Cleaner is a surgical WPO (Web Performance Optimization) utility. It helps you remove unnecessary JavaScript and CSS from the Home only, reducing render-blocking work and payload size where it matters most for first paint.

By tightening what loads on the homepage, you can improve metrics such as LCP (Largest Contentful Paint) and FCP (First Contentful Paint), while keeping other templates and the admin experience unchanged—provided you block handles deliberately and test thoroughly.


How it works

The plugin uses passive detection:

  1. While a user with administrator privileges browses the public site (not wp-admin), the plugin records the handles of enqueued scripts and styles into options (cdsc_detected_scripts, cdsc_detected_styles).
  2. From Cedeño Dev WPO in the WordPress dashboard, you review the detected lists and mark which handles to disable on the Home only.
  3. On the front page, the plugin runs late (wp_enqueue_scripts at priority 9999) and dequeues/deregisters the selected scripts and styles for visitors on that view.

Detection is observational: it reflects what WordPress and your theme/plugins enqueue on a real page load when an admin is logged in. Refresh the homepage after theme or plugin changes if you need an up-to-date inventory.


Security

  • Capability: Settings and detection tied to logged-in users with manage_options (typically administrators).
  • Forms: Saves are protected with WordPress nonces (wp_nonce_field / check_admin_referer).
  • Visitors: Normal visitors are not involved in detection. Passive capture runs only for eligible admins on the frontend; blocking rules apply on the front page according to saved options.

Installation

  1. Copy the folder cedenodev-script-cleaner into wp-content/plugins/.
  2. Activate Cedeño Dev: Script Cleaner under Plugins.
  3. Visit your homepage while logged in as an administrator (to populate detected assets).
  4. Open Cedeño Dev WPO in the admin menu, select handles to disable on the Home, and Save changes.

Main plugin file: cedenodev-script-cleaner/cedenodev-script-cleaner.php.


IMPORTANT — Use with caution

Critical: Blocking the wrong assets can break layouts, interactions, or WooCommerce/checkout flows on the homepage. Handles such as jquery or theme/core styles are often dependencies for other scripts or for base presentation.

Always validate after changes using a private/incognito window (or a non-admin session) so you see what real visitors get. Keep a rollback plan (uncheck blocked items and save) before deploying to production.


Professional consulting

For advanced WPO, Core Web Vitals roadmaps, WooCommerce performance, and safe asset strategies tailored to your stack, you can hire Christian Cedeño on Malt:

Christian Cedeño — Malt profile


Plugin package: Cedeño Dev: WP Script Cleaner · Text domain: cedenodev-script-cleaner