84% mhm-menu-separator

Code Review | Add menu separators to navigation

WordPress plugin Add menu separators to navigation scored84%from 54 tests.

About plugin

  • Plugin page: mhm-menu-separator
  • Plugin version: 2.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: May 4, 2016
  • Latest release: Nov 11, 2022
  • Number of updates: 34
  • Update frequency: every 70.1 days
  • Top authors: markhowellsmead (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /12,938 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.86ms] Passed 4 tests

An overview of server-side resources used by Add menu separators to navigation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.26 ▼8.51
Dashboard /wp-admin3.32 ▲0.0248.47 ▲0.04
Posts /wp-admin/edit.php3.38 ▲0.0145.96 ▼7.61
Add New Post /wp-admin/post-new.php5.91 ▲0.0191.91 ▼15.34
Media Library /wp-admin/upload.php3.25 ▲0.0139.64 ▲5.67

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Add menu separators to navigation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.201.66 ▼0.0238.22 ▼7.37
Dashboard /wp-admin2,198 ▲245.57 ▼0.0594.41 ▼3.3141.10 ▲2.93
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0535.18 ▼7.0329.10 ▼8.49
Add New Post /wp-admin/post-new.php1,526 ▼223.00 ▼0.05674.00 ▲65.0552.21 ▼6.73
Media Library /wp-admin/upload.php1,400 ▲64.10 ▼0.07110.30 ▲9.4849.04 ▲8.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/mhm-menu-separator/mhm-menu-separator.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: menu, separator, navigation, sayhellogmbh, wp_nav_menu

mhm-menu-separator/mhm-menu-separator.php 92% from 13 tests

The principal PHP file in "Add menu separators to navigation" v. 2.1.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 220 characters long)

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 plugin70 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131570

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin