WordPress plugin: <head> cleanup

This plugin removes a lot of the default markup which isn’t needed for most professional blogs from the <head> of a website. I wrote it as a quick and dirty way of making my website more efficient and secure. These are the elements that the plugin removes:

  • REST API links added by the rest_output_link_wp_head action
  • Meta generator tag with exact WordPress version added by the wp_generator action
  • Windows Live Writer metadata added by the wlwmanifest_link action
  • XML-RPC link for third-party software added by the rsd_link action
  • Shortlink added by wp_shortlink_wp_head action (you can still use shortlinks without this)
  • Adjacent post links added by adjacent_posts_rel_link_wp_head action
  • Prefetch hints added by wp_resource_hints action
  • Emoji styles and scripts

None of these are things I really need on my website (especially emojis), and some, like the WordPress version, could be harmful from a security standpoint. Feel free to grab a copy from my GitHub repository and use it however you like!

Photo by Joe Dunckley used under CC BY-NC-SA 2.0 license. Cropped and resized slightly but otherwise unmodified.