Skip to content
Plugin PantryPlugins

Plugins / Pantry Cleanup

Plugin Pantry

Pantry Cleanup

v1.0.0

Contents: Switch off the WordPress features you do not use.

18 KB, no external requests

A list of switches, each with one sentence saying exactly what it removes. Emoji scripts, embeds, XML-RPC, header links, user enumeration, author archives, comments, jQuery Migrate, revisions, heartbeat. Every switch is off by default and does one thing.

Compared with the popular plugins

The Pantry Cleanup settings screen in the WordPress admin, at Settings > Pantry Cleanup.

What it does

  • Disable the emoji detection script and styles
  • Disable oEmbed discovery and the wp-embed script
  • Disable XML-RPC and remove its pingback header
  • Remove RSD, WLW manifest, shortlink, generator and feed links from the head
  • Block REST API user listing for visitors who are not logged in
  • Disable author archives and remove author links
  • Disable comments site-wide: close them, hide the menu and admin-bar items, remove comment feeds; existing comments are kept
  • Disable self-pingbacks
  • Disable jQuery Migrate on the front end
  • Remove Dashicons on the front end for visitors who are not logged in
  • Limit the number of post revisions and set the autosave interval
  • Change the heartbeat interval or disable it on the dashboard

What it does not do

  • No per-page script manager
  • No caching or minification
  • No database clean-up
  • No image or font optimisation

Measured footprint

Zip size
18 KB
Lines of PHP
1,297
Options
pantry_cleanup_settings
Post meta
none
Custom tables
none
Post types
none
Cron events
none
Transients
none
Admin assets
includes/core/assets/pantry-admin.css on the settings screen only, includes/core/assets/pantry-admin.js on the settings screen only
Front-end assets
none
External requests
none
Measured on
2026-09-12

Compatibility

WordPress
6.4 or newer, tested to 7.1
PHP
8.1 or newer
Where it lives
Settings > Pantry Cleanup
Licence
GPLv2 or later

Documentation

Switch off the WordPress features you do not use. One settings screen, one switch per feature, every switch off by default.

Settings screen: Settings > Pantry Cleanup.

What it does

Each row below is its own switch. Turning one on only affects the thing it names; nothing else changes.

  • Emoji script — removes the emoji detection script and inline styles WordPress prints on every front-end and admin page, and the staticizing filters used in feeds and outgoing mail.
  • Embeds — removes oEmbed discovery links and the embed host script from the page head, deregisters the wp-embed front-end script, and turns off oEmbed auto-discovery.
  • XML-RPC — disables the xmlrpc.php endpoint, clears the list of available XML-RPC methods, and removes the X-Pingback response header.
  • Self-pingbacks — stops WordPress from pinging itself when a post links to another post on the same site. Pingbacks from other sites are not affected.
  • REST API user list — removes the /wp/v2/users and /wp/v2/users/<id> REST routes for visitors who are not logged in, so usernames cannot be enumerated through the REST API.
  • Head links — removes the RSD link, the Windows Live Writer manifest link, the shortlink, the generator tag, and the default feed links from wp_head.
  • Author archives — sends author archive requests to a 404, and rewrites author links to the homepage.
  • Comments — closes comments and pingbacks site-wide, empties the comment list on the front end, removes the comments feed link, hides the Comments admin menu and admin bar item, and removes comment and trackback support from every public post type. Comments already stored in the database are not deleted.
  • jQuery Migrate — removes jquery-migrate from the jquery script's dependencies on the front end. The admin area keeps it.
  • Dashicons — deregisters the dashicons style on the front end for visitors who are not logged in. Logged-in visitors keep it, since the admin bar can use it.
  • Revisions — filters wp_revisions_to_keep to the number you set. This switch has no effect if WP_POST_REVISIONS is already defined in wp-config.php; that constant always wins, and the settings screen says so.
  • Autosave interval — filters autosave_interval to the number of seconds you set.
  • Heartbeat interval — filters heartbeat_settings to the number of seconds you set.
  • Dashboard heartbeat — removes heartbeat from wp-auth-check's dependencies and dequeues it on wp-admin/index.php only. Post editing screens keep Heartbeat, so autosave and post locking keep working.

What it does not do

  • No per-page script manager.
  • No caching or minification.
  • No database clean-up.
  • No image or font optimisation.

Filters and actions

Pantry Cleanup only turns core WordPress hooks on or off; it does not add any hooks of its own for other plugins to use.

Data

One option, pantry_cleanup_settings, holding every switch and number as a single array. No tables, no custom post types, no cron events, no transients, no post meta. Uninstalling the plugin deletes the option.

Requirements

  • WordPress 6.4 or newer
  • PHP 8.1 or newer

Pro add-on (planned)

See Pantry Pro pricing
  • Per-page script and style manager
  • Database clean-up with a dry run
  • Local Google Fonts

None of this is in the free plugin, and none of it is switched off inside it. Pro would be a separate plugin.

Changelog

All notable changes to Pantry Cleanup are documented in this file, in the Keep a Changelog format.

1.0.0 - 2026-09-12

  • First release.
  • Switch: disable the emoji detection script and styles.
  • Switch: disable oEmbed discovery and the wp-embed script.
  • Switch: disable XML-RPC and remove its pingback header.
  • Switch: disable self-pingbacks.
  • Switch: block the REST API user list for logged-out visitors.
  • Switch: remove RSD, WLW manifest, shortlink, generator and feed links from the head.
  • Switch: disable author archives and remove author links.
  • Switch: disable comments site-wide while keeping existing comments.
  • Switch: disable jQuery Migrate on the front end.
  • Switch: remove Dashicons on the front end for logged-out visitors.
  • Switch: limit the number of post revisions.
  • Switch: set the autosave interval.
  • Switch: set the Heartbeat interval.
  • Switch: disable Heartbeat on the dashboard screen.