- Removes the Generator/WordPress Version number from the head section for security reasons. You don’t want your WordPress version being visible because hackers can use it to attack your site. Even if you keep your site up to date, it still could be vulnerable to zero-day exploits.
- Removes Version numbers from CSS and JS links in the HEAD for the same security reasons you hide WordPress version. Will also improve site loading speed because removing version numbers from the CSS and JS links will allow browsers to properly cache these files, as well as helping your site code to validate.
- Removes junk code from the head section of your site: RSD link, Windows Live Writer Manifest link, WordPress Shortlinks, Adjacent Posts links (REL = PREV/NEXT) as all are unnecessary, hurt your SEO and clutter your site code.
- Removes HTML comments from your site’s code to improve speed and security.
- Fix the “Read more” link so it displays the entire post when you click, not just the part after the “#more”.
Why Do I Need RS Head Cleaner Plus?
Here’s a more detailed explanation of what the plugin does.
The code for the WordPress version number is in the HEAD section of your page and looks like this:
<meta name='generator' content='WordPress 2.7' />
Showing the WordPress version in your site code exposes your site to hackers. Many exploits are version-specific, and even if you keep you blog up to date, there are zero-day exploits that occur before a new version can be released to patch the problem. Hackers run automated programs call “bots” to scour sites looking for this line of code with WordPress versions, and when they find one that matches the version of the exploit they are looking to launch, they send another bot to those sites to launch the attack.
That’s why it’s important to remove the WordPress version number from your site. (Obviously you need to secure your site using more than just this one method.)
Once you activate this plugin, the WordPress version will disappear from your site code.
By default WordPress inserts version numbers into the CSS links in the HEAD section of your page and looks like this:
<link rel='stylesheet' id='example-css' href='http://www.yourblog.com/wp-includes/css/example-css.css?ver=3.5.1' type='text/css' media='all' />
Showing the WordPress version in your CSS and JS links again exposes your site to hackers. For the same reasons we remove the WordPress Generator, you want to remove them from here.
But, that’s not all. Having the version numbers appended to the link keeps browsers from caching the CSS and JS files. If you want your site to run at its fastest, one aspect of that is using caching properly. Removing these version numbers will now allow browsers to cache those files.
One last thing…having version numbers appended to the CSS and JS links causes sites not to validate. So in order to get your site code to validate 100%, you will want to remove those.
Once you activate this plugin, this issue will be fixed and the resulting code will look like this:
<link rel='stylesheet' id='example-css' href='http://www.yourblog.com/wp-includes/css/example-css.css' type='text/css' media='all' />
This plugin cleans up the HEAD section of your site. For those of you not familiar, that’s the HTML code located between the <HEAD> and </HEAD> tags. WordPress inserts code that can hurt your SEO and site security. This plugin will automatically remove these lines of junk code for you. I’ll explain in a bit more detail.
1 — Remove the The RSD Link
RSD stand for Really Simple Discovery. In a nutshell, it helps remote client software find the info it needs to read and edit the blog. WordPress inserts the following code:
<link rel='EditURI' type='application/rsd+xml' title='RSD' href='http://www.yourblog.com/xmlrpc.php?rsd' />
The RSD link is only needed if you use remote publishing to your blog. If you only edit your blog through a browser (which is true for most people) then it is more secure to remove this from the header. As a general rule and best practice, it’s always better to have clean code and remove unused code from a site, for efficiency, security and SEO.
2 — The Windows Live Writer Manifest Link
<link rel='wlwmanifest' type='application/wlwmanifest+xml' href='http://www.yourblog.com/wp-includes/wlwmanifest.xml' />
This is a similar deal to RSD. The bottom line is, if you’re not using Windows Live Writer, remove the WLW Manifest link from the HEAD section of your site code to improve security and SEO.
3 — Remove WordPress Shortlinks from the HEAD and HTTP Headers
Shortlinks is a protocol you can use to specified shortened URL’s for each page in your site code. WordPress has provided its own URL-shortening service. WordPress inserts code in your header that provide a link to the “shortened” URL:
<link rel='shortlink' href='http://www.yourblog.com/?p=1257' />
If you don’t actually request a shortlink when you write your post/page, it will insert the raw unshortened URL into your page. Ouch. If you notice, it matches the default URL structure before you even setup permalinks in the WordPress settings.
Why even have WordPress create clean, SEO-friendly permalinks, if it’s going to ignore your settings and insert junk like this into your site? Not cool. To be clear, these are NOT SEO-friendly URL’s. It’s one thing to use these for Twitter or affiliate links, but its bad idea to include these in your site code. It is not recommended under any circumstance. These should be removed no matter what as they will only hurt your SEO in a number of ways.
That’s not the only place where WordPress places shortlinks. They are also inserted into the HTTP headers. (These are served invisibly to the browser before the page loads.) Again, ouch. See what it looks like:
Link: <http://www.yourblog.com/?p=1257> rel=shortlink
The thing is, this is all according to shortlinks protocol, but WordPress’ implementation is incorrect. If the user has not specifically chosen to create shortlinks, there should not be default “shortlinks” inserted into the site — there should be none at all — and especially not ones that are in the format shown, with SEO-unfriendly URLs, and which expose post ID’s. That’s ok though, this plugin will fix it for you.
4 — Adjacent Posts Links: REL=”PREV” and REL=”NEXT”
WordPress Adjacent links were meant to be an aid in helping with canonical issues with paginated posts on a blog. Unfortunately WordPress’ implementation is incorrect and inserts these on ALL posts/pages, even ones that are not paginated:
<link rel='prev' title='Previous Page' href='http://www.yourblog.com/previous-page/' />
<link rel='next' title='Next Page' href='http://www.yourblog.com/next-page/' />
What this does is create a mess, and hurt your SEO. I’ve seen it list pages in these links that were completely unrelated just because they had sequential post numbers in WordPress. I highly recommended turning off the WordPress’ default implementation (which this plugin will do for you).
These days it is important for a number of reasons to speed up your site as much as possible. It even affects your SEO and advertising costs:
- Usability — Usability and user-friendliness always needs to be the first concern on your website. It’s important to speed up your page because if you have a slow site, it will eventually drive people away. Make your site faster, and improve user engagement on your site.
- AdWords Quality Score — When you advertise on AdWords, Google assigns a quality score for ad. This affects your costs for advertising if you have a poorer score. Page speed is one of the factors that affects your quality score.
- Apply gzip compression (which further shrinks file size) and add far future “Expires” headers to the concatenated CSS and JS files.
- To improve page load speed when Contact Form 7 is installed, the plugin will only include the JS and CSS for Contact Form 7 on pages that actually use its forms. (It tests the page content for the CF7 shortcode…if none are detected, then the CSS & JS aren’t included.)
All of this has been tested and verified with GTMetrix, which tests websites using Google PageSpeed and Yahoo YSlow, and shows the scores. Check it out for yourself…do a before and after test with your site and watch your Google PageSpeed and Yahoo YSlow Scores improve right before your eyes.
For more information, this is explained in more detail further down the page.
Many plugins and themes add notes in the HTML code of your site using HTML comments. After a while this can add up to many extra kilobytes of data, slowing down your page. It also can potentially expose information about plugins you are using. This plugin fixes that and removes all that junk automatically.
By default, on a WordPress site when a visitor sees an archive page with a list of posts (Home Page, Categories, Tags Archives, Date Archives, Search Results, etc.) and they click on the “Read more” link, it takes them to the point in the post where the more tag was inserted (
<!--more-->). This plugin fixes that issue, so when a visitor clicks the “Read more” link, it will display the entire post, for an improved user experience.
- It skips jquery files and other files that are known to need to stay in the head of the page.
- All properly enqueued WordPress CSS and JS files will be included…even theme files if they use the WordPress enqueue process. If the theme outputs the CSS and JS directly to HTML then they won’t be included.
- When the CSS files are combined, all image URL’s referenced in the CSS are corrected, since the CSS file will now be in a different location. Yeah, the plugin is that smart.
- The minified cache files will be stored in sub-directories of your wp-content folder: “/rshcp-cache/css/” and “/rshcp-cache/js/”. There will be a lot of files in these directories…that’s ok…these are the cache files. That means everything is working.
- There will be two versions of each page’s CSS and JS files…one with “min” in the name, and one with “raw”. The “min” file is what gets used on your page, and the “raw” file is uncompressed file kept to use as a reference by the plugin so it knows when the code has changed.
Page Speed Improvements: What Results Can You Expect?
Results will vary on every site. (I have to get that out of the way.) It’s going to depend on how optimized your site already is. But even optimized sites will get excellent results.
This plugin will improve these elements of your Google PageSpeed Score (and more):
- “Minify CSS”
- “Remove query strings from static resources”
It will also improve these elements of your Yahoo YSlow Score (and more):
- “Make fewer HTTP requests”
Real Before and After Examples from GTMetrix:
Google PageSpeed Before/After
Yahoo YSlow Before/After
If you want to see the real difference it makes, go to GTMetrix and run a before and after comparison. Deactivate the plugin and run your “Before” report and print it or save as a PDF, and then reactivate it and run your “After” report and print it or save as a PDF. (This works best if you disable caching on your site and clear the file cache before you run these.) Then compare your two reports to see the difference.
When you run your reports, pay attention to the elements mention in the Before/After examples above, and also pay attention to:
- “Page load time”
- “Total Page size”
- “Total number of requests”
These improvements in page loading speed may also help your website’s SEO, in particular your Google rankings, because website speed is a factor in ranking now. I suspect it will become an even more important part of the ranking algorithm as time goes on.
For Best Results
If you REALLY want your site speed to increase, use this in combination with WP Super Cache. Use the “mod_rewrite” method, and then the “Preload” option to preload the the pages of your site. What this will do is go through your site, and create a cached version of every page before anyone ever visits the page, so it will be super fast on the first visit. This will also ensure that all the cache files for RS Head Cleaner Plus are created before anyone visits.
Make sure when you install this plugin and activate it, if you ARE using caching software, have your plugin delete the file cache first thing, otherwise the new improvements won’t go into effect until it refreshes the cache.
Option 1: Install the plugin directly through the WordPress Admin Dashboard (Recommended)
- Go to Plugins -> Add New.
- Type RS Head Cleaner Plus into the Search box, and click Search Plugins.
- When the results are displayed, click Install Now.
- When it says the plugin has successfully installed, click Activate Plugin to activate the plugin (or you can do this on the Plugins page).
Option 2: Install .zip file through WordPress Admin Dashboard
- Go to Plugins -> Add New -> Upload.
- Click Choose File and find
rs-head-cleaner.zipon your computer’s hard drive.
- Click Install Now.
- Click Activate Plugin to activate the plugin (or you can do this on the Plugins page).
Option 3: Install .zip file through an FTP Client (Recommended for Advanced Users Only)
- After downloading, unzip file and use an FTP client to upload the enclosed
rs-head-cleanerdirectory to your WordPress plugins directory (usually
/wp-content/plugins/) on your web server.
- Go to your Plugins page in the WordPress Admin Dashboard, and find this plugin in the list.
- Click Activate to activate the plugin.
As with any JS/CSS minification & caching plugin, it’s important to test, test, test. Because of the type of plugin it is, this plugin may not work for every site out there, but that does not mean the plugin is broken. If you have any issues, please submit a support request so we can look into it and make it as compatible as possible for everyone.
This plugin has not been designed specifically for use with Multisite. It can be used in Multisite if activated per site, but should not be Network Activated. As with any plugin, test and make sure it works with your particular setup before using on a production site.
Version 1.4, released 06/27/15
- Added a minimum required PHP version of 5.3, as we are no longer supporting PHP 5.2. The PHP team stopped supporting PHP 5.2 back in 2011, and even PHP 5.3 reached its end of life in August 2014. WordPress has a current minimum requirement of 5.2.4, but PHP 5.4 is recommended – see the WordPress requirements. It’s extremely important that users stay up to date with the most recent version of WordPress (currently 4.1.1) and a reasonably up-to-date version of PHP for security, functionality, and website performance. (Not only are the newer versions more secure, but they are faster, so its a double win.) We recommend PHP 5.4 or higher, especially if you care about optimizing your site’s speed. Also, see PHP Unsupported Branches for more info.
- Modified the deactivation and uninstall functions to clean up the files in the old folder location as well.
- Fixed a bug where CSS & JS cache files were not being written in certain situations.
Version 1.3.9, released 06/26/15
- Added gzip compression and far future Expires headers to concatenated CSS and JS files.
- Moved the plugin’s cache folder into the
/wp-content/cache/folder. New location is
- Changed the cache file naming system to utilize a faster method.
- Fixed a bug with login/registration pages not loading scripts properly.
Version 1.3.8, released 06/20/15
- Added a feature to remove HTML comments and blank lines in the HTML code.
Version 1.3.7, released 04/22/15
- Added an
.htaccessfile to the
rs-head-cleanerdirectory to control browser access to certain files.
- Increased minimum required WordPress version to 3.8.
- Made various code improvements.
Version 1.3.6, released 03/06/15
- Made various minor code improvements.
Version 1.3.5, released 03/03/15
- Fixed a minor bug in the uninstall function.
Version 1.3.4, released 03/01/15
- Added an uninstall function that completely uninstalls the plugin and removes all cache files, options, data, and traces of its existence when it is deleted through the dashboard.
Version 1.3.3, released 01/19/15
- Fixed a minor bug.
- Increased minimum required WordPress version to 3.7.
Version 1.3.2, released 12/18/14
- Added additional security checks.
- Various code improvements.
- Fixed a bug that caused the plugin to attempt to cache web font files.
Version 1.3.1, released 07/12/14
- Added additional security checks.
- Fixed a minor bug.
Version 1.3, released 07/03/14
Version 1.1.1, released 06/17/14
- Updated some features.
Version 22.214.171.124, released 04/28/14
- Fixed a bug that caused an error message on certain server configurations.
Version 126.96.36.199, released 04/13/14
- Added additional security checks.
Version 188.8.131.52, released 04/04/14
- Minor code improvements.
Version 184.108.40.206, released 03/26/14
- Added feature to remove version numbers from CSS and JS links in the HEAD.
Version 220.127.116.11, released 03/17/14
- Initial release.
- Q: Where are the options?
A: This plugin is fast, and lean…there are no options needed. You install it and it just works.
- Q: Does this plugin have any known issues?
A: Just one that we know of.
Test this plugin out on your site before deciding if it will be the right solution for you. Normally I would create an options page to let you turn the JS-to-Footer feature off, but this plugin is all about speeding up your site, and that means minimal calls to the database, so unfortunately it would defeat the purpose of this plugin if I added the ability to change that.
- Q: But I already have a Caching Plugin like WP Super Cache installed? Why do I need CSS and JS caching?
- Q: What if I Don’t Want to Have My Page’s CSS Files Cached?
A: This plugin is built for speed. That’s why it doesn’t have an options page, because I didn’t want it to have any database calls, which would slow it down. After a certain amount of database calls, you lose any speed improvements. Amazon.com found that for every 100 milliseconds (1/10th of a second) their site slowed down, they lost 1% in sales. Ouch.
This new feature is integral to the plugin, so the caching isn’t a feature you want, then this plugin won’t be the right match for you. It’s designed for people that are very speed conscious, and want hardcore solutions.
From Reviews of the plugin on WordPress.org:
Great Plugin! I’m telling you. I have tried every single minifier and caching plugin available and compatible with 4.0. Nothing happened! My site speed stayed at around 69-73/100 on Pingdom Tools and around 79-83/100 on Google PageSpeed Insights. I almost gave up looking for a plugin that could improve speed while at the same time allows me to edit my site without having to delete the cache and refresh the page a million times. Until I stumbled upon this amazing plugin today. I installed and activated it (You don’t have to do anything else after activation) And…Zoooom! Wow! I got 89/100 on Pingdom and 90/100 on Google pagespeed insights.
WOW it works well! Hi all.
I have placed this plugin on a small number of websites to see what happens to the speed of loading and the site itself. Speed, is about 25% faster and the site, nothing just the same. A very nice plugin.
This developer is someone to watch.
From Reviews of the plugin on WordPress.org:
Awsome Awesome Awesome Thank youuuuuu sooooo much man.
It does exactly what you describe.
I install with cross finger to hope not having my website to crash.
I use also use W3 Total Cache plugin.
Just out the box. No configuration nothing.
Than I did check with gtmetrix.
Its sky roketed.
It worth searching and reading and reading.
Thank you so much. THIS IS MUST HAVE PLUGIN.
My website quite heavy. Because of the huge amount of 300×300 pics. (1300+ pictures and plenty large size slights)
Roll the drum please…….
Page Speed Grade:A
I am very happy indeed with this result.
Guys out there who use this plugin, please don’t be lazy to rate this plugin. Developer deserves more than that.
Some times I see 800.000 download only 300 something 5 star rate.
It is not fare to developer.
Be genuine and spare your way of saying thank you with rating.
I come back to add more about this plugin. I did install all my clients website. I am sure when they go to visit their website, they will be very surprise.
I achieved 97 – 91 with gmetrix. And, believe me those sites has huge size pictures.
If you need a version that doesn’t have the JS to Footer code, try RS Head Cleaner Lite:
Download RS Head Cleaner Lite Plugin (.zip)
The following are required to run RS Head Cleaner Plus and RS Head Cleaner Lite on your site:
- WordPress 3.8 or higher (Recommended: WordPress 4.0 or higher)
- PHP 5.3 or higher (Recommended: PHP 5.4 or higher)
NOTE: We no longer support PHP 5.2. If you are still using PHP 5.2 on your server, it’s extremely important that you upgrade as soon as possible. All legitimate web hosts offer PHP 5.3, 5.4, and 5.5, and the upgrade is not time consuming or difficult, it literally is just a change in configuration to switch to the newer version. If your web host does not offer anything past 5.2, then it is time to change hosts immediately.
The PHP team stopped supporting PHP 5.2 back in 2011, and even PHP 5.3 reached its end of life in August 2014. (If you’re not familiar with the term, “End of Life” means the point where a certain version of software is no longer supported, and no more security or performance patches will be made. PHP 5.2 has known security flaws and is extremely slow….PHP 5.3 is more than double the speed on any hardware.
WordPress itself has a current minimum requirement of 5.2.4, but PHP 5.4 is (highly) recommended – see the WordPress requirements. In our opinion, they should have dropped support for 5.2 a long time ago, and this opinion is shared by many. It’s extremely important that users stay up to date with the most recent version of WordPress and a reasonably up-to-date version of PHP for security, functionality, and website performance. (Not only are the newer versions more secure, but they are faster, so its a double win.) We recommend PHP 5.4 or higher. Also, see PHP Unsupported Branches for more info.