Note: I am not actively maintaining this plugin since I migrated away from WordPress for my main website. However, I don’t plan to get rid of it, and I think this code can still be a helpful learning resource.
This plugin removes a lot of the default markup which isn’t needed for most professional blogs from the
<head> of a WordPress 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
- Meta generator tag with exact WordPress version added by the
- Windows Live Writer metadata added by the
- XML-RPC link for third-party software added by the
- Shortlink added by
wp_shortlink_wp_headaction (you can still use shortlinks without this)
- Adjacent post links added by
- Prefetch hints added by
- 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!
Thumbnail photo by Joe Dunckley used under CC BY-NC-SA 2.0 license. Cropped and resized slightly but otherwise unmodified.