But apparently plugins often lie about their JS and CSS, with some files claiming to be minified which clearly are not and with some files (even WordPress core files) being minified but not having the min-suffix in the name. It’s obvious that lying like that is kind of stupid: saying your files is minified when in fact it is not, offers you no advantages. Not confirming your file is minified in the name when it is, saves you 4 characters in the filename, but I suspect you were just being lazy, sloppy or tired, no?
So, ladies and gentlemen, can we agree on the following:
- Ideally you ship your plugin/ theme with minified JS & CSS.
- If your files are minified, you confirm that in the filename by adding the “.min”-suffix and minification plugins will skip them.
- If your files are not minified, you don’t include the “.min”-suffix in the filename, allowing for those minification plugins tot minify them.
For a more detailed overview of how to responsibly load minified JS/ CSS in WordPress, I’ll happily point you to Matt Cromwell’s excellent article on the subject.