WordPress Optimization

WordPress has a lot of code just to keep backward compatibility or enable optional features. The WordPress optimization module helps you disable most of it and save some time from each page request while making your installation safer.

Wordpress Optimization Module in Machete 1.7

Header Cleanup

This section removes code from the <head> tag. This makes your site faster and reduces the amount of information revealed to a potential attacker.

  • RSDR SDRemove Really Simple Discovery(RSD) links. They are used for automatic pingbacks.
  • WLW Remove the link to wlwmanifest.xml. It is needed to support Windows Live Writer. Yes, seriously.
  • feed_links Remove Automatics RSS links. RSS will still work, but you will need to provide your own links.
  • adjacent_posts Remove the next and previous post links from the header
  • shortlink Remove the shortlink url from header
  • wp_generator Remove WordPress meta generator tag. Used by atackers to detect the WordPress version.
  • version Remove WordPress version var (?ver=) after styles and scripts. Used by atackers to detect the WordPress version.
  • recent_comments_style Removes a block of inline CSS used by old themes from the header
  • dns-prefetch Removes dns-prefetch links from the header

WordPress Optimization Tweaks

This section goes further disabling optional features. All options can be safely activated, but keep an eye on potiential plugin compatibility issues.

  • JSON API Disable Json API and remove link from header. Use with care. The video widget added in WordPress 4.8 needs the JSON API to work.
  • Emojicons Remove lots of emoji styles and scripts from the header, RSS, mail function, tinyMCE editor…
  • PDF Thumbnails Starting with 4.7, WordPress tries to make thumbnails from each PDF you upload, potentially crashing your server if GhostScript and Imagemagick aren’t properly configured. This option disables PDF thumbnails.
  • Limit Post Revisions Limits the number of stored revisions to 5 only WP_POST_REVISIONS constant has been defined. remove
  • jQuery-migrate jQuery-migrate provides diagnostics that can simplify upgrading to new versions of jQuery, you can safely disable it. Breaks some themes that depend on visual builders, like Avada or The7
  • Remove oEmbed Scripts Since WordPress 4.4, oEmbed is installed and available by default. If you don’t need oEmbed, you can remove it.
  • Slow Heartbeat By default, heartbeat makes a post call every 15 seconds on post edit pages. Change to 60 seconds (less CPU usage).
  • JS Comment reply Load the comment-reply JS file only when needed.
  • Empty trash every week You can shorten the time posts are kept in the trash, which is 30 days by default, to 1 week.