WordPress plugin intelligence profile

Dependency Minification

Automatically concatenates and minifies any scripts and stylesheets enqueued using the standard dependency system.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.7
Current version0.9.8
WordPress coverageTested up to WordPress 3.7
Minimum stackWP 3.5 · PHP —
Directory statusactive
Last directory update25 Feb 201511y ago
Active installations20Adoption metric — not a quality score
WordPress.org rating4.0 / 5 from 11 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Dependency Minification version 0.9.8 as active, updated 11y ago and tested up to WordPress 3.7.

Overview

About this plugin

This plugin takes all scripts and stylesheets that have been added via wp_enqueue_script and wp_enqueue_style

and automatically concatenates and minifies them into logical groups. For example, scripts in the footer get grouped

g. print ) get minified together. Minification is done via WP-Cron in order

to prevent race conditions and to ensure that the minification process does not slow down page responses.

This is a reincarnation and rewrite of the Optimize Scripts plugin,

which this plugin now supersedes.

Features:

  • Minified sources are stored in the WP Options table so no special filesystem access is required.
  • Endpoint for minified requests is at /_minified, which can be configured.
  • Admin page for taking inventory of minified scripts and stylesheets, with methods for expiring or purging the cached data.
  • Dependencies which must not be minified may be excluded via the dependency_minification_excluded filter.
  • Dependencies hosted on other domains are by default excluded, but this behavior can be changed by filtering the default_exclude_remote_dependencies option via the dependency_minification_options filter, or on a case-by-case basis via the filter previously mentioned.
  • By default excludes external scripts from being concatenated and minified, but they can be opted in via the dependency_minification_excluded filter.
  • The length of time that a minified source is cached defaults to 1 month, but can be configured via the cache_control_max_age_cache option.
  • If a minified source is not available yet, the page source will note that the dependency minification process is pending.
  • Any errors that occur during minification will be shown on the frontend in comments if the show_error_messages option is enabled; such errors are enabled by default if WP_DEBUG.
  • If the minification process errors out, the original unminified sources are served and the error is cached for 1 hour (by default, configured via cache_control_max_age_error ) to prevent back-to-back crons from continually attempting to minify in perpetuity.
  • Cached minified sources are served with Last-Modified and ETag responses headers and requests will honor If-None-Match and If-Modified-Since to return 304 Not Modified responses (configurable via the allow_not_modified_responses option).
  • Data attached to scripts (e.g. via wp_localize_script ) is also concatenated together and attached to the newly-minified script.
  • WP-Cron is utilized to initiate the minification process in order to prevent race conditions, and to ensure that page responses aren’t slowed down.
  • Stale minified scripts and stylesheets remain until replaced by refreshed ones; this ensures that full-page caches which reference stale minified sources won’t result in any 404s.
  • Can serve compressed responses with gzip or deflate.
  • Transforms relatives paths in stylesheets (e.g. background-images) to absolute ones, so that they don’t 404.

Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.

conf (or remove the rule altogether):

# Handle all static assets by serving the file directly. Add directives # to send expires headers and turn off 404 error logging. (js|css|png|jpg|jpeg|gif|ico)$ { expires 24h; log_not_found off; }

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • compress
  • concatenate
  • dependencies
  • minify
  • performance
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.7

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.7.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.7
Minimum requirementsWordPress 3.5 · PHP not listed
Update activity25 Feb 201511y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.