10% wp-easy-menu

Code Review | WP-Easy Menu

WordPress plugin WP-Easy Menu scored10%from 54 tests.

About plugin

  • Plugin page: wp-easy-menu
  • Plugin version: 0.41
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2012
  • Latest release: Jul 6, 2012
  • Number of updates: 53
  • Update frequency: every 3.2 days
  • Top authors: jordisalord (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /20,407 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-easy-menu/wp-easy-menu.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyMenu has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼50.31ms] Passed 4 tests

An overview of server-side resources used by WP-Easy Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.374.99 ▼33.09
Dashboard /wp-admin2.12 ▼1.195.73 ▼43.25
Posts /wp-admin/edit.php2.12 ▼1.246.69 ▼36.84
Add New Post /wp-admin/post-new.php2.12 ▼3.776.05 ▼88.05
Media Library /wp-admin/upload.php2.12 ▼1.114.81 ▼27.83

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP-Easy Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.35 ▼0.181.90 ▲0.2645.89 ▲8.68
Dashboard /wp-admin2,210 ▲305.64 ▲0.0881.13 ▼6.7338.87 ▼4.31
Posts /wp-admin/edit.php2,109 ▲121.96 ▼0.0635.99 ▲1.7332.76 ▼5.11
Add New Post /wp-admin/post-new.php1,538 ▲1023.28 ▲0.30673.36 ▲58.2864.17 ▲15.49
Media Library /wp-admin/upload.php1,409 ▲94.17 ▼0.0992.97 ▼1.6840.98 ▼1.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-easy-menu/wp-easy-menu.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyMenu has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-easy-menu/html/wp-admin-sidebar.php
    • > /wp-content/plugins/wp-easy-menu/html/wp-admin.php
    • > /wp-content/plugins/wp-easy-menu/html/wp-admin-form.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/wp-easy-menu/wp-easy-menu.php:20
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-easy-menu/wp-easy-menu.php on line 18
    • > PHP Warning
      constant(): Couldn't find constant WEMENU_URL in wp-content/plugins/wp-easy-menu/html/wp-admin.php on line 8
    • > PHP Notice
      Undefined variable: sidebar_init in wp-content/plugins/wp-easy-menu/html/wp-admin-sidebar.php on line 5
    • > PHP Warning
      constant(): Couldn't find constant WEMENU_URL in wp-content/plugins/wp-easy-menu/html/wp-admin-form.php on line 7

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Adding Home), #2 (Adding Category), #3 (Adding Page), #4 (Adding Custom), #5 (Result), #6 (WP-Easy Menu on Website)
You can take inspiration from this readme.txt

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

"WP-Easy Menu" version 0.41's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
107 characters long description:
Automatically generates menu from taxonomies, custom post types, categories, pages, posts and custom links.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,462 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9248671,304
CSS110158

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity28.40
▷ Minimum class complexity3.00
▷ Maximum class complexity59.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods47
▷ Static methods4187.23%
▷ Public methods4697.87%
▷ Protected methods00.00%
▷ Private methods12.13%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.48MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png86.15KB31.08KB▼ 63.92%
screenshot-1.png64.97KB23.72KB▼ 63.48%
screenshot-2.png59.04KB21.12KB▼ 64.22%
screenshot-4.png53.61KB19.25KB▼ 64.09%
screenshot-7.png29.90KB10.47KB▼ 64.99%