10% remove-invalid-menu-items

Code Review | Remove invalid menu items

WordPress plugin Remove invalid menu items scored10%from 54 tests.

About plugin

  • Plugin page: remove-invalid-me...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: May 13, 2019
  • Latest release: Jul 28, 2022
  • Number of updates: 7
  • Update frequency: every 167.6 days
  • Top authors: webdevshojib (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /907 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'rimip' does not have a method 'active'

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.13ms] Passed 4 tests

Server-side resources used by Remove invalid menu items
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.96 ▼6.02
Dashboard /wp-admin3.32 ▼0.0348.89 ▼17.93
Posts /wp-admin/edit.php3.37 ▲0.0154.88 ▲7.25
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.71 ▲3.94
Media Library /wp-admin/upload.php3.24 ▲0.0138.03 ▲3.48

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Remove invalid menu items
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲5614.37 ▲0.021.82 ▼0.6045.47 ▼4.68
Dashboard /wp-admin2,200 ▲235.65 ▼0.0292.08 ▼8.5746.34 ▲3.85
Posts /wp-admin/edit.php2,102 ▲52.01 ▼0.0240.38 ▲2.1936.61 ▲0.82
Add New Post /wp-admin/post-new.php1,537 ▲1118.34 ▼5.19660.31 ▼40.8883.70 ▲31.36
Media Library /wp-admin/upload.php1,405 ▲54.27 ▲0.09100.66 ▼4.5844.70 ▲0.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'rimip' does not have a method 'deactivate'
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/remove-invalid-menu-items/remove-invalid-menu-items.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

remove-invalid-menu-items/remove-invalid-menu-items.php 92% from 13 tests

The principal PHP file in "Remove invalid menu items" v. 1.3.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Git Repository: An alternative Git repository was detected

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
There were no executable files found in this plugin49 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2133320
Markdown113018
JavaScript15311

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin