84% sm-vertical-menu

Code Review | SM Vertical Menu

WordPress plugin SM Vertical Menu scored 84% from 54 tests.

About plugin

  • Plugin page: sm-vertical-menu
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.8
  • WordPress version: 6.3.1
  • First release: Oct 15, 2016
  • Latest release: Nov 23, 2016
  • Number of updates: 11
  • Update frequency: every 25.6 days
  • Top authors: mahabubs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active / 15,980 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 successfully, without throwing any errors or notices

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

Server-side resources used by SM Vertical Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.00 ▼13.41
Dashboard /wp-admin3.32 ▲0.0143.94 ▼4.70
Posts /wp-admin/edit.php3.37 ▲0.0144.66 ▼4.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.20 ▼24.43
Media Library /wp-admin/upload.php3.24 ▲0.0135.58 ▲1.53

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_sm_vertical_menu
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

SM Vertical Menu: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6413.41 ▼1.001.81 ▼0.1837.60 ▲0.68
Dashboard /wp-admin2,225 ▲375.11 ▼0.7996.62 ▼0.0137.90 ▼6.37
Posts /wp-admin/edit.php2,110 ▲212.28 ▲0.2735.39 ▼6.6829.74 ▼5.05
Add New Post /wp-admin/post-new.php1,528 ▼623.10 ▲0.05651.24 ▼8.5735.75 ▼18.82
Media Library /wp-admin/upload.php1,407 ▲224.53 ▲0.3394.42 ▼8.3442.19 ▼5.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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_sm_vertical_menu
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sm-vertical-menu/sm_vertical_menu.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: menu, widget, vertical menu

sm-vertical-menu/sm_vertical_menu.php 92% from 13 tests

The principal PHP file in "SM Vertical Menu" v. 1.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sm-vertical-menu.php" instead of "sm_vertical_menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin315 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1521165
PHP12340147
JavaScript1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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