Asset CleanUp vs Autoptimize

Autoptimize and Asset CleanUp are CSS and JS code optimization plugins for WordPress, with a good rating of 4.7+ in the WordPress repository. Autoptimize is more popular than Asset CleanUp. It has around a million users. Its alternative has 100k users but is growing in popularity daily.

Below, we’ve compared the two WordPress optimizer extensions. Find out which JS/CSS optimization plugin has a better JS/CSS minification/combination system and more options.

JavaScript optimization

Asset CleanUp Lite and Autoptimize can remove white space, eliminate/reduce duplicate code, etc. This process is called minification. The two plugins can also reduce the number of HTTP requests by merging JS/CSS files. They can defer the loading of JS files and can enclose the JS file links in the try-catch block. The try-catch statement is an exception handling mechanism used in several programming languages. The try block has business logic, and the catch statement may have conditions or a statement that shows the error in the console.

When JS code execution fails because of an error, you can see the error in the browser’s console. Asset CleanUp can detect inline jQuery code and move it below the jQuery library call to prevent errors on your site. It can cache dynamically loaded JS.

Autoptimize will automatically move the combined noncritical JS files to the footer. In its JS settings section, you’ll find an option to make the plugin keep the combined JavaScript files in the <head> </head> section. AC Pro can move the files to the body section to eliminate or reduce render-blocking errors. The two WP plugins can inline the JavaScript code in HTML.

CSS optimization

CSS is the most important part of a website. It is responsible for the appearance and layout of a website. Asset CleanUp can inline the CSS code present in the CSS files of the size you specify. Autoptimize doesn’t let users specify file size. It can create data URI for pictures and inline above-the-fold CSS to reduce the rendering time of the HTML elements and layout. You won’t find this option in AC Lite.

The two WP optimization plugins can inline entire CSS and reduce the number of CSS files and HTTP requests. Asset CleanUp can improve the performance of dynamically loaded CSS files by caching them. Its Pro version can defer CSS files present in the body/footer. Defer option in Autoptimize is available only for JS files.

Async loading of files

Autoptimize can load JS files you specify in its “extra” settings form asynchronously. The two extensions support pre-connect resource hints and can preload files of your choice.

Removing unwanted scripts and files

Asset CleanUp can remove oembeds and emoji scripts from the site. It can remove the comment reply and dashicon script from the site. Autoptimize lets users get rid of the emoji script from the HTML code of their site. If you check the raw access log files, you’ll learn that the xmlrpc.php file is one of the most active/requested files on WordPress sites. With the Asset CleanUp plugin, you can disable the XML RPC protocol on your website. AO can remove the version (ver) parameter from the URLs.

Google Font optimization

Asset CleanUp has a dedicated section for Google fonts. Autoptimize includes four Google Fonts related options. The two plugins can remove the font files from the HTML code altogether. They can load the font files asynchronously with the Webfont.js library. They can combine the files and add the display swap attribute to the font URLs.

CSS/JS management for individual pages/posts

Asset CleanUP features a CSS/JS Manager utility that detects the script/CSS files on the page and shows an option to remove the detected script/stylesheet from the page/pages of the website. The section also enables you to preload or defer specific scripts or disable/enable minification/combination of CSS/JS files for some or all pages. AO has the option to enable metabox for posts. When the option is enabled, you’ll find a metabox with options to activate/disable JS/CSS optimization for the post you’re currently editing.

Test mode

After configuring Asset Cleanup, you can test the setup by activating the “test mode”. When this mode is active, the plugin will apply the settings for admin users only. Autoptimize doesn’t have a test mode function, and you can configure it to not optimize any files for the admin users.


Asset CleanUp (minification + combination):

Asset Cleanup performance

Autoptimize (minification + combination):

Autoptimize performance

As you can see in the above screenshots, there’s a 20 ms difference between the load time of pages (Autoptimize is faster). When AC Lite’s CSS/JS minification/combiner function is active, the number of requests the browser made was 8, and when AO was active, only six requests were made. There’s a slight difference of 2 Kb between the size of the page with scripts/stylesheets minified by the two plugins.

The developer of Autoptimize has not launched a paid version of their plugin. AC Pro lets you unload CSS/JS files on the date/tag/category archive pages, add async/defer attribute to JS files, inline JavaScript files in HTML, and make the browser on a device of specific screen sizes to download/cache JS/CSS files. The single site license of the extension costs 49 dollars. The three and unlimited site license is priced at 79 and 149 dollars.

Autoptimize or Asset CleanUp can be an excellent companion to simple page caching plugins such as WP Super Cache or server-level caching solutions such as Nginx microcache. If you’re looking for a WP extension that minifies JS/CSS files and can cache pages, you can use WP Rocket.


Pramod is the founder of wptls. He has been using WordPress for more than nine years. He builds web applications, and writes about his experiences with various WP products on this site.

Leave a Reply

Your email address will not be published. Required fields are marked *