84% vm-menu-reorder

Code Review | VM Menu Reorder plugin

WordPress plugin VM Menu Reorder plugin scored84%from 54 tests.

About plugin

  • Plugin page: vm-menu-reorder
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.5
  • WordPress version: 6.3.1
  • First release: Apr 23, 2016
  • Latest release: Apr 24, 2016
  • Number of updates: 9
  • Update frequency: every 54.2 days
  • Top authors: milankyada (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /2,867 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.70ms] Passed 4 tests

This is a short check of server-side resources used by VM Menu Reorder plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.90 ▼7.42
Dashboard /wp-admin3.38 ▲0.0849.10 ▼5.77
Posts /wp-admin/edit.php3.44 ▲0.0851.45 ▲5.13
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.64 ▲0.16
Media Library /wp-admin/upload.php3.31 ▲0.0835.95 ▼5.76
Reorder Admin Menus /wp-admin/options-general.php?page=reorder_menu_page3.2736.30

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

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

Browser metrics Passed 4 tests

A check of browser resources used by VM Menu Reorder plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.73 ▲0.451.82 ▼0.2138.70 ▼6.57
Dashboard /wp-admin2,199 ▲225.64 ▲0.0587.06 ▼2.9240.45 ▲1.76
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0334.55 ▼2.6834.02 ▼1.96
Add New Post /wp-admin/post-new.php1,529 ▼623.43 ▲4.97691.29 ▼7.3958.64 ▼13.55
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.0196.77 ▼14.8642.50 ▼8.38
Reorder Admin Menus /wp-admin/options-general.php?page=reorder_menu_page1,0432.1837.6946.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • mr_user_cap
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • menu_with_array_value
    • mr_default_reorder_menu_position
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • mr_original_position

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/vm-menu-reorder/index.php:9

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: dashboard, hide menu, admin menu, admin menu reorder, userrole menu order

vm-menu-reorder/index.php 92% from 13 tests

"VM Menu Reorder plugin" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("vm-menu-reorder.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,110 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2757447
CSS2110405
JavaScript1647258

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity69.00
▷ Minimum class complexity69.00
▷ Maximum class complexity69.00
Average method complexity7.18
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 were not PNG files found in your plugin