79% menu-item-editor

Code Review | WordPress Menu Editor

WordPress plugin WordPress Menu Editor scored79%from 54 tests.

About plugin

  • Plugin page: menu-item-editor
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.7
  • WordPress version: 6.3.1
  • First release: Apr 16, 2021
  • Latest release: Apr 16, 2021
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: jbennett45 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /310 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.07ms] Passed 4 tests

Server-side resources used by WordPress Menu Editor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.16 ▼0.19
Dashboard /wp-admin3.40 ▲0.0949.09 ▼7.26
Posts /wp-admin/edit.php3.51 ▲0.1550.66 ▲1.51
Add New Post /wp-admin/post-new.php6.00 ▲0.1185.18 ▼10.33
Media Library /wp-admin/upload.php3.32 ▲0.0939.93 ▲6.42

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

WordPress Menu Editor: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.58 ▼0.795.06 ▲3.1737.80 ▼3.47
Dashboard /wp-admin2,226 ▲355.88 ▲0.97112.22 ▲4.2345.96 ▲7.00
Posts /wp-admin/edit.php2,109 ▲202.02 ▲0.0138.91 ▼0.0234.62 ▼1.43
Add New Post /wp-admin/post-new.php1,541 ▲2218.24 ▼4.66610.47 ▼69.2162.42 ▲5.80
Media Library /wp-admin/upload.php1,408 ▲234.18 ▼0.12102.13 ▼8.8546.34 ▼0.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/menu-item-editor/public/partials/menu-item-editor-public-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-item-editor/admin/partials/admin-menu-editor.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/menu-item-editor/admin/class-menu-item-editor-admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/menu-item-editor/admin/partials/hide-menu-outputuser.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/menu-item-editor/admin/partials/hide-menu-callbacks.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were detected

menu-item-editor/menu-item-editor.php Passed 13 tests

"WordPress Menu Editor" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
108 characters long description:
Within the Menu Editor tab you will be able to hide each of the default WordPress menu items to your liking.

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
Success! There were no dangerous files found in this plugin565 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15119589544
CSS211115
JavaScript24546

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin