78% remove-and-rearrange-menu

Code Review | Remove and Rearrange Menu

WordPress plugin Remove and Rearrange Menu scored 78% from 54 tests.

About plugin

  • Plugin page: remove-and-rearra...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Mar 28, 2022
  • Latest release: Mar 29, 2022
  • Number of updates: 23
  • Update frequency: every 0.2 days
  • Top authors: shahbrijesh1992 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 276 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼0.33ms] Passed 4 tests

Analyzing server-side resources used by Remove and Rearrange Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3046.45 ▲2.56
Dashboard /wp-admin3.60 ▲0.2950.92 ▼1.96
Posts /wp-admin/edit.php3.72 ▲0.3555.04 ▲1.25
Add New Post /wp-admin/post-new.php6.20 ▲0.31104.36 ▲10.55
Media Library /wp-admin/upload.php3.53 ▲0.2936.71 ▼3.18

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Remove and Rearrange Menu: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲10213.66 ▲0.445.09 ▲3.4640.54 ▼2.87
Dashboard /wp-admin2,214 ▲84.98 ▼0.93110.01 ▼5.6539.78 ▲2.80
Posts /wp-admin/edit.php2,100 ▲82.06 ▲0.0244.43 ▲4.3435.58 ▼1.78
Add New Post /wp-admin/post-new.php1,539 ▼323.52 ▲5.39586.70 ▼26.2458.06 ▲1.22
Media Library /wp-admin/upload.php1,390 ▲24.21 ▲0.0199.61 ▼2.0141.40 ▼2.21

Uninstaller [IO: ✅] [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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/remove-and-rearrange-menu/public/partials/remove_and_rearrange_menu-public-display.php
    • > /wp-content/plugins/remove-and-rearrange-menu/admin/partials/remove_and_rearrange_menu-admin-display.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/remove-and-rearrange-menu/admin/class-remove_and_rearrange_menu.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/nav-menu.php' (include_path='.:/usr/share/php') in wp-content/plugins/remove-and-rearrange-menu/admin/class-remove_and_rearrange_menu.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/nav-menu.php): failed to open stream: No such file or directory in wp-content/plugins/remove-and-rearrange-menu/admin/class-remove_and_rearrange_menu.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/remove-and-rearrange-menu/includes/class-remove_and_rearrange_menu-settings.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
You can take inspiration from this readme.txt

remove-and-rearrange-menu/remove_and_rearrange_menu.php 85% from 13 tests

The primary PHP file in "Remove and Rearrange Menu" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Name the main plugin file the same as the plugin slug ("remove-and-rearrange-menu.php" instead of "remove_and_rearrange_menu.php")

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
Success! There were no dangerous files found in this plugin614 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14150554460
JavaScript21027123
CSS221131

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.78
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.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