84% wp-menu-item-status

Code Review | WP Menu Item Status

WordPress plugin WP Menu Item Status scored84%from 54 tests.

About plugin

  • Plugin page: wp-menu-item-status
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.5.0
  • WordPress version: 6.3.1
  • First release: Nov 20, 2016
  • Latest release: Nov 24, 2016
  • Number of updates: 13
  • Update frequency: every 0.7 days
  • Top authors: linasalve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /976 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.03ms] Passed 4 tests

Analyzing server-side resources used by WP Menu Item Status
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.53 ▼2.51
Dashboard /wp-admin3.36 ▲0.0244.70 ▼18.20
Posts /wp-admin/edit.php3.42 ▲0.0647.95 ▲4.84
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.77 ▼7.23
Media Library /wp-admin/upload.php3.29 ▲0.0635.48 ▼0.16

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Menu Item Status
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.16 ▼1.132.24 ▲0.4040.26 ▼4.23
Dashboard /wp-admin2,206 ▲214.83 ▼1.06109.29 ▲0.5539.52 ▼11.60
Posts /wp-admin/edit.php2,089 ▲32.05 ▼0.0840.39 ▲3.3134.71 ▲1.72
Add New Post /wp-admin/post-new.php1,514 ▼017.56 ▲0.12644.40 ▼23.0857.71 ▲2.80
Media Library /wp-admin/upload.php1,388 ▲34.25 ▲0.0397.69 ▼14.6742.25 ▼4.38

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
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/wp-menu-item-status/includes/class_Walker_Nav_Menu_Edit_Status.inc.php:15

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: nav menu, menu status, disable menu, nav menus, menu...

wp-menu-item-status/wp-menu-item-status.php 92% from 13 tests

The primary PHP file in "WP Menu Item Status" version 1.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin284 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP352106284

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.25
Average class complexity14.50
▷ Minimum class complexity9.00
▷ Maximum class complexity20.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin