84% user-dropdown-menu

Code Review | User Dropdown Menu

WordPress plugin User Dropdown Menu scored84%from 54 tests.

About plugin

  • Plugin page: user-dropdown-menu
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Nov 14, 2016
  • Latest release: Dec 21, 2016
  • Number of updates: 13
  • Update frequency: every 2.5 days
  • Top authors: sagaio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,211 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.36ms] Passed 4 tests

Server-side resources used by User Dropdown Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1937.90 ▼4.40
Dashboard /wp-admin3.49 ▲0.1447.90 ▼10.81
Posts /wp-admin/edit.php3.54 ▲0.1845.92 ▼3.60
Add New Post /wp-admin/post-new.php6.07 ▲0.1883.07 ▼2.62
Media Library /wp-admin/upload.php3.41 ▲0.1838.60 ▲3.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Dropdown Menu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.57 ▼0.804.66 ▲2.7845.78 ▲3.66
Dashboard /wp-admin2,206 ▲184.86 ▼1.03104.27 ▼13.2741.71 ▼4.85
Posts /wp-admin/edit.php2,086 ▼62.00 ▼0.0535.71 ▼0.6534.07 ▼1.96
Add New Post /wp-admin/post-new.php1,533 ▼023.64 ▲0.55603.76 ▼103.1859.39 ▲3.33
Media Library /wp-admin/upload.php1,382 ▼64.19 ▼0.0095.48 ▼12.5540.58 ▼3.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/user-dropdown-menu/user-dropdown-menu.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: dropdown, menu, user dropdown menu, woocommerce menu, dropdown menu

user-dropdown-menu/user-dropdown-menu.php Passed 13 tests

The main PHP file in "User Dropdown Menu" ver. 1.0.8 adds more information about the plugin and also serves as the entry point for this plugin
75 characters long description:
Insert a dropdown menu with a icon button, based on Bootstrap 4.0 Dropdown.

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 plugin1,134 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP113584634
JavaScript29754289
CSS2307211

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods9100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/user_icon_1.png1.54KB1.45KB▼ 5.84%