90% menu-caching

Code Review | Menu Caching

WordPress plugin Menu Caching scored90%from 54 tests.

About plugin

  • Plugin page: menu-caching
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 5, 2022
  • Latest release: Aug 14, 2023
  • Number of updates: 14
  • Update frequency: every 38.4 days
  • Top authors: theogk (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /5,633 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.32ms] Passed 4 tests

A check of server-side resources used by Menu Caching
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.68 ▼6.23
Dashboard /wp-admin3.33 ▲0.0248.48 ▼2.45
Posts /wp-admin/edit.php3.38 ▲0.0256.47 ▲3.73
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.45 ▼31.32
Media Library /wp-admin/upload.php3.25 ▲0.0238.51 ▼1.29
Menu Caching /wp-admin/tools.php?page=menu-caching3.2233.20

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Menu Caching: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.73 ▲0.451.74 ▼0.0141.26 ▼2.01
Dashboard /wp-admin2,202 ▲285.58 ▼0.0985.69 ▼4.6439.68 ▼1.50
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0333.78 ▼5.5434.89 ▼5.34
Add New Post /wp-admin/post-new.php1,529 ▲323.66 ▲0.61663.84 ▼6.4961.71 ▲7.81
Media Library /wp-admin/upload.php1,401 ▲14.22 ▲0.13115.79 ▲3.4648.05 ▼1.58
Menu Caching /wp-admin/tools.php?page=menu-caching8132.0424.8229.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.31MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: wordpress menu, caching, menu cache, speed up menu, menu caching

menu-caching/menu-caching.php Passed 13 tests

The entry point to "Menu Caching" version 1.1.2 is a PHP file that has certain tags in its header comment area
64 characters long description:
This plugin caches WordPress menus to improve page loading time.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected477 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9145403352
CSS111069
JavaScript110056

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.17
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2987.88%
▷ Protected methods00.00%
▷ Private methods412.12%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin