Thoughts on Autoptimize for Wordpress (or similar)

Joined
Oct 14, 2014
Messages
87
Likes
66
Degree
0
In the past, I've manually tried to deregister/dequeue alot of the css and js files plugins include, to have them all in a single, or few as possible, files. This obviously makes for a bigger file, but limits requests like most of want.

I don't know why I've never thought that there might exist a plugin that can handle that for me on a continuous basis, but recently I came across https://wordpress.org/plugins/autoptimize/

What it does is concatenate, minify and cache all scripts and css styles, regardless of which theme or plugins you're using. There are some other optimization features included as well.

My question is, isn't this ideal? Am I missing something, because I don't really see this type of plugin talked about, and the whole "optimization" game is something we all struggle with. Why wouldn't you run this on your site?

I realize things can possibly go wrong, but in that case you can just revert back and go from there. So far, it seems to work where I'm testing. Great reviews too (but what do they know, right)

There are several other plugins of the sort, so this goes for this type in general.

Thoughts?
 
I've used it, especially on sites for others that are heavily plugin dependent. It works great. I wholly recommend it to anyone who can't do this work on their own.

We should note for readers that it ONLY concatenates (preserving order of enqueueing) and minifies what is enqueued. Anything hard-coded in the header or footer will not be included.

We should also note that if you're going HTTP/2, you probably don't want to concatenate any more. The reason we concatenate for regular HTTP is because it takes longer to open and close the single connection over and over again for smaller files than it does to open it once and send a massive file. With HTTP/2, we're no longer restricted to one pipeline, so we can shoot several files over one connection at the same time, which is interesting to see if you look at any waterfall timelines of the requests. So it's better, on HTTP/2, to shoot 10 smaller files at once than 1 big one, because the browser can get them and parse them faster without waiting on all 10 coming as one.

But, if you are on regular classic HTTP and are trying to speed optimize your site, @jäger is right. This is a very effective plugin to have. Be careful and make sure it works well with your caching or CDN.
 
Good stuff, especially on the requests on HTTP/2 - wasn't aware of that.

Why would you only recommend it to people who can't do it on their own? Wouldn't it amount to the same result, automated or manual?
 
I never suggest dependency on a plugin when you can do it your own. There's countless times a black hat developer buys out a plugin and inserts link injection code into it and pushes an update, or gets backend access to your site, etc. That's the reason.

Of course I don't recommend trying to concatenate the files from all the plugins you're using. That would be nearly impossible and dumb because it would get undone each time you update the plugins. The risk is fairly low and the upside is huge for most websites, especially those using a lot of plugins or a crazy theme with tons of stuff enqueued. I'm definitely saying use it if that's the case.
 
Autoptimize is solid, for the reasons Ryuzaki mentioned. I've used it on several sites for quite awhile, and always had good results.

Best part is, it's simple. With other plugins like WP Super Cache or W3 Total Cache, settings get far more complex and sometimes tricky to work with. With Autoptimize, you flip a few "switches" to turn on what you want, maybe list a file exclusion or two if necessary, and you're off to the races.
 
Interesting, I have a very bloated theme that I’m in the process of replacing. I might give this a try in the short term to try and get page speed down.

@turbin3 mentioned WP super cache, would Autoptimize replace this plugin or is it compatible?
 
Back