WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Theo Gkitsos v1.1.4

Menu Caching

This plugin caches WordPress classic menus to improve page loading time.

Menu Caching

The facts

Rating
5★ from 4
Active installs
400+
Price
Free
Last updated
4 Dec 2024
Added
Mar 2022
Requires WP
5.3
Tested up to
WP 6.7.7
Requires PHP
7.4
Downloads
11,286

Our analysis

AI-assisted

Menu Caching is a WordPress plugin designed to improve the performance of websites by caching menu HTML. It reduces the number of database calls made when users visit pages with menus, which can significantly enhance page loading times, especially on sites with multiple menus or large menu items.

The plugin allows you to enable or disable caching on a per-menu basis, automatically purges cached data when menus are edited, and refreshes cached data every 10 hours. It is compatible with various caching and translation plugins, making it suitable for a range of WordPress sites, particularly those with complex menu structures.

Best for: This plugin is suitable for WordPress sites with complex or multiple menus seeking to enhance performance.

What it does well

  • Caches HTML of classic WordPress menus
  • Improves page loading times
  • Enables/disables caching per menu
  • Automatically purges cache on menu edits
  • Compatible with popular caching and translation plugins

Where it falls short

  • Limited information on specific performance improvements
  • No detailed user feedback or case studies provided

Verdict

Menu Caching can be a useful tool for improving site performance, especially for those with extensive menu structures. However, its effectiveness may vary depending on the overall site setup and use of other caching solutions.

From the developer

Theo Gkitsos's own description of Menu Caching, lightly tidied.

We all know that database calls are the main performance bottleneck in WordPress. What most people don’t know though, is how “expensive” in terms of performance the WordPress menus are.

This plugin will cache the menu HTML and show the cached version to your visitors, saving your database from far too many unnecessary calls.

Menu data are scattered across six(!) different database tables. When a user visits a page, an odyssey throughout the database begins.
In ‘wp_terms’, ‘wp_term_taxonomy’ and ‘wp_options’ tables we’ll find menu ID, slug and theme location. Then ‘wp_posts’ and ‘wp_postmeta’ to find menu’s nav items and their metas.
In the metas, we will find its targeted object, so let’s pay ‘wp_terms’ or ‘wp_posts’ a visit again to find the menu item’s target and ‘wp_termmeta’ to find its metas.

These are a lot of tables and even more database calls! When all required data is collected, the menu HTML is created and it is shown to the user.

The same process is repeated for every menu on the page. Desktop menu, mobile menu, some menus on the footer, a menu for the customer account on the header’s right next to the cart icon…

Imagine all these menus, some of them with decades of menu items, loading in every page for every visitor on your site.

Menu changes are very rare and this makes them an easy target for caching. Caching the generated menu HTML will prevent all these unnecessary database calls and greatly improve page loading times.

Full features list

  • Caches all classic WordPress menus to improve page loading time.
  • Enable/disable caching per menu.
  • Clear all menu cache with a button on the settings page.
  • Every time you edit a menu, its cache is automatically purged.
  • All cached data are automatically purged every 10 hours to keep everything fresh, like nonces etc.
  • Compatible with caching plugins like WPRocket, W3 Total Cache etc.
  • Compatible with most translation plugins. Tested ok with WPML and TranslatePress.

How it works

Everytime a user visits a page with a menu, WordPress collects all menu data from the database, and then runs a walker to create the menu’s HTML. Right before this generated HTML is returned to the user, the HTML is saved in the database in a transient.

Next time a user requests this specific menu, the saved HTML will be returned, instead of creating the menu from scratch.

Test results – How effective is it anyway?

If you use a good caching plugin and a certain page is served from cache, then you not see a difference in loading times. BUT… there are many cases when a page is not served from cache and it that scenario you will notice a huge difference.

Some of the scenarios when a page is not served from cache:

  • If you are not using a page caching plugin (Why not? Please install one!).
  • No existing cached version exists of the requested page. You benefit from menu caching during the first page load on every page, before the cached version is saved.
  • When users are logged-in. Even when using a per-user cache for logged-in users, menu caching is still super useful to quickly create the menu as the cache files are getting created.
  • On e-commerce sites on pages that can’t be cached by default, like cart, checkout, my account, wishlist etc.
  • In most e-commerce sites, when a customer adds something to cart, then serving pages from cache stops to prevent false data in the mini-cart.
  • On some AJAX requests that load page content that includes menus.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for making sites fast.

WP-Optimize

Get caching and more with this powerful cache plugin. Cache, optimize images, clean your database and minify f...

Free 1M+ installs 4.8★ (2,606)
LiteSpeed Cache

All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...

Free 7M+ installs 4.8★ (2,764)
EWWW Image Optimizer

Comprehensive image optimization with WebP, AVIF, Lazy Load, and more. Optimize images automatically for Faste...

Free 1M+ installs 4.8★ (1,838)
Under Construction

Easy to use Under Construction Page & Coming Soon Page. Enable Under Construction Mode in seconds & sh...

Free 600k+ installs 4.8★ (1,285)
Smush

Smush

93

Compress and optimize images, enable lazy load, serve WebP & AVIF, and speed up your site with a global im...

Free 1M+ installs 4.8★ (6,051)
Converter for Media

Speed up your website by using our WebP & AVIF Converter. Optimize images and serve WebP and AVIF images i...

Free 500k+ installs 4.9★ (1,097)