84% easy-menu-cache

Code Review | Easy Menu Cache

WordPress plugin Easy Menu Cache scored84%from 54 tests.

About plugin

  • Plugin page: easy-menu-cache
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.6
  • WordPress version: 6.3.1
  • First release: Jul 10, 2016
  • Latest release: Sep 1, 2016
  • Number of updates: 6
  • Update frequency: every 8.8 days
  • Top authors: marcocanestrari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,421 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.79ms] Passed 4 tests

Analyzing server-side resources used by Easy Menu Cache
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.63 ▼3.53
Dashboard /wp-admin3.31 ▲0.0146.67 ▼1.52
Posts /wp-admin/edit.php3.36 ▲0.0144.78 ▼2.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.28 ▼11.27
Media Library /wp-admin/upload.php3.24 ▲0.0134.28 ▲0.04

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Easy Menu Cache: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.40 ▼0.981.72 ▼0.1543.15 ▲5.12
Dashboard /wp-admin2,209 ▲185.90 ▲1.0297.77 ▼5.1438.29 ▼1.31
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0338.79 ▲2.8434.63 ▼11.15
Add New Post /wp-admin/post-new.php1,514 ▼017.58 ▼0.05675.67 ▼9.1051.80 ▼1.09
Media Library /wp-admin/upload.php1,382 ▼34.22 ▲0.0397.71 ▲0.1643.04 ▼3.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-menu-cache/easy-menu-cache.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: caching, menu, wpnav, performance, cache...

easy-menu-cache/easy-menu-cache.php Passed 13 tests

The entry point to "Easy Menu Cache" version 1.1.0 is a PHP file that has certain tags in its header comment area
49 characters long description:
Caches all navigation menus in a single wp_option

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected41 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1314741

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin