Dependency Minification

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 together and styles with the same media (e.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.

If you are using Nginx with the default Varying Vagrant Vagrants config, you'll want to remove css|js from this rule in nginx-wp-common.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.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires 24h;
    log_not_found off;
}

WP Super Minify

This plugin combines, minifies, and caches inline JavaScript and CSS files on demand to speed up page loads, using Minify PHP Framework. By activating this plugin, you will see the source of your HTML, inline JavaScript and CSS are now compressed. The size will be smaller and quite helpful to impro.........

Similar: 54%

WP Performance Score Booster

This plugin speed-up page load times and improve website scores in services like PageSpeed, YSlow, Pingdom and GTmetrix....

Similar: 38%

WP Optimize Speed By xTraffic

Plugin WP Optimize Speed By xTraffic speed up your WordPress website, save resources and bandwidth of server, increase website's Google PageSpeed Insights point. Everything is done completely automatically, and you can change the options from the administration settings panel....

Similar: 32%

RS Head Cleaner Lite

This plugin cleans up a number of issues, doing the work of multiple plugins, improving efficiency, security, SEO, and user experience. It removes junk code from the document HEAD & HTTP headers, combines/minifies/caches CSS & JavaScript files, hides the Generator/WordPress Version number, r.........

Similar: 28%

RS Head Cleaner Plus

This plugin cleans up a number of issues, doing the work of multiple plugins, improving speed, efficiency, security, SEO, and user experience. It removes junk code from the document HEAD & HTTP headers, moves JavaScript from header to footer, combines/minifies/caches CSS & JavaScript files, .........

Similar: 27%

WP Minify Fix

This plugin is a fork of WP Minify to fix bugs and add features, because it has not been updated since 2012-6-4. This plugin integrates the Minify engine into your WordPress blog. Once enabled, this plugin will combine and compress JS and CSS files to improve page load time....

Similar: 23%

WP Super Simple Speed

Super Simple Speed is a stable and powerful plugin that dramatically increases your WordPress page load speed and gives you a better performance score on the major speed testing services. Unlike most other similar plugins, WP Super Simple Speed is lightweight (less than 20kb in size), and has no clu.........

Similar: 20%

JCH Optimize

Speed up your WordPress site instantly with JCH Optimize! This plugin provides all the front end optimizations you need to optimize your website download speed. Core feature is to automatically aggregate CSS and javascript files to reduce the number of http requests made by the browser to download y.........

Similar: 19%

Admin Flush W3TC Cache

Adds "Empty All Caches" link to the top of every Admin page. Clicking the link clears all caches and returns you to your current page. No need to go to Performance options anymore, just clear the cache from wherever you are. Requires the W3 Total Cache plugin, so make sure it is installed and activ.........

Similar: 16%

W3 Total Cache

The only WordPress Performance Optimization (WPO) framework; designed to improve user experience and page speed. Recommended by web hosts like: Page.ly, Synthesis, DreamHost, MediaTemple, Go Daddy, Host Gator and countless more. Trusted by countless companies like: AT&T, stevesouders.com, matt.........

Similar: 12%