New WordPress Plugin - Script-Style-Killer

Posted at

WordPress loads many scripts and styles, (jQuery core and various-jQuery-plugins are few of the major ones)
in-case you don't really need them, I've wrote a plugin that will "kill" (remove from the HTML, in a very unforgiving way..),
this without the need to dig into the WordPress-API itself.

Track the added script and styles added to your page, by copy&pasting the following code into your template (use any FTP-client for that), just don't forget to remove it after you'll be done with-it.

<!-- <?php
global $wp_styles;
global $wp_scripts;

?> -->


"Killing" scripts and styles of your page is done by commenting them out of the HTML,
<script type="text/javascript" async="async" src="""></script>
will transform into
<!-- SCRIPT-KILLER:["jquery"]/REMOVED:[""] -->


naturally *one* should check the console for errors such as could not find '

(or .. jQuery'),
but if your wordpress-plugins do not use jQuery, it should be rather safe..

those are the keywords that will trigger the script -or- style removing (with no particular order, ..and it is not case-sensitive)

using Google PageSpeed (by Apache's plugin "ModPageSpeed") or this cool minifier plugin for WordPress can remove the comments and make the entire textual content quite small indeed..

have fun!