plugin-icon

AssetPilot – Granular control over frontend assets

作者:Amr Abdelkarem·
Conditionally disable, defer, and preload scripts and styles — with page scans, safety checks, and Safe Mode.
版本
1.0.0
最后更新
Jun 4, 2026
AssetPilot – Granular control over frontend assets

AssetPilot helps you speed up WordPress by controlling which scripts and styles load on which pages — without guessing handle names in functions.php.

Scan a real page URL, see every enqueued asset (and many from the HTML), then create rules to disable, defer, async, preload, or set fetch priority — only where your conditions match (homepage, shop, mobile, logged-in users, specific URLs, and more).

Built for site owners who want measurable wins and for developers who want conditional dequeue with guardrails: validation warnings, dependency insight, scan history, and Safe Mode if something breaks.

Why AssetPilot instead of a simple “unload” plugin?

  • See before you change — scan a URL and browse assets with origin, size, and usage hints.
  • Rules, not one-off hacks — reusable conditions (page type, archive, WooCommerce views, device, auth, URL).
  • Bulk actions — one rule for many handles (e.g. a plugin’s scripts everywhere except checkout).
  • Safer changes — conflict checks, impact preview, optional verification, automatic runtime pause after repeated errors.
  • Stay in control — dependency graph, recommendations, debug logs, and Safe Mode.

What you can do

  • Disable scripts and styles you do not need on specific views
  • Defer or async JavaScript to reduce render-blocking work
  • Preload critical scripts, styles, fonts, and images
  • Set fetchpriority on images and preloads
  • Target by singular page, post type, archive, URL fragment, query string, device, login state, user role, WooCommerce page type, and scan URL
  • Create bulk rules from the asset list
  • Review optimization recommendations from scan data
  • Explore asset dependencies in a visual graph
  • Keep scan history and compare what changed over time

Typical use cases

  • Stop a plugin’s CSS/JS on pages where it is not used (blog posts, landing pages, archives)
  • Defer non-critical scripts on catalog pages while keeping checkout intact
  • Preload hero fonts or LCP images on key templates only
  • Audit what Elementor, WooCommerce, or form plugins actually enqueue before tightening rules

How it works

  1. Open AssetPilot Assets and scan a page (your homepage, a product page, a form page, etc.).
  2. Pick an asset (or select several for a bulk rule).
  3. Choose an action and conditions (where the rule applies).
  4. Review validation and impact, then save.
  5. Visit the front end — use Safe Mode anytime you need to disable all runtime rules instantly.

The block editor includes an AssetPilot sidebar on supported setups so you can jump from a post to asset management with context.

Requirements

  • WordPress 6.2+
  • PHP 8.1+
  • Administrator access to configure rules

Frontend runtime changes apply to public site views, not the WordPress admin dashboard.

Getting started

First rule in a few minutes

  1. Assets enter your site homepage URL scan.
  2. Find a script or style from a plugin you suspect is unnecessary on the homepage.
  3. Click to create a rule choose Disable (or Defer for scripts).
  4. Set a condition such as “this scan URL only” or “non-WooCommerce pages” if you are testing carefully.
  5. Save, open the homepage in a private window, and confirm the site still works.

Use Recommendations after a few scans for ideas (duplicate libraries, large files, low usage patterns).

Create Rule is opened from assets or recommendations — it is the guided wizard for actions, conditions, validation, and review.

Safe Mode

If the site looks wrong after applying rules, enable Safe Mode while logged in as an administrator:

/wp-admin/?assetpilot-safe-mode=1

Safe Mode turns off all frontend runtime rule changes for the whole site. The admin UI, REST API, scanning, and rule editing still work. Clear any page cache after enabling if changes seem to stick.

If repeated frontend fatals occur, AssetPilot pauses runtime rules for 30 minutes automatically. Resume early from Settings or:

/wp-admin/admin.php?page=assetpilot-settings&assetpilot-resume-runtime=1<h3>Development</h3>

Source repository: https://github.com/amrelarabi/assetpilot

Human-readable UI source is in assets/src/. Production bundles in assets/build/ are built with @wordpress/scripts.

Build (contributors only):

  1. npm install
  2. npm run build

PHP lives under includes/ (Composer PSR-4, AssetControl\ namespace).

Third-party frontend libraries: @xyflow/react (dependency graph), react-select (rule builder fields).

Extension hooks: assetpilot_rest_register, assetpilot_admin_localize, assetpilot_admin_menu_pages, assetpilot_scan_saved, assetpilot_condition_handlers, assetpilot_site_key_scan_urls, assetpilot_site_key_scan_max_urls, assetpilot_key_pages_scan_complete

免费基于付费套餐
通过安装,您同意 WordPress.com 服务条款第三方插件条款
目前已测试版本
WordPress 7.0
这个插件是可用的下载,适用于您的站点。