10% user-role-menu-by-worldwideweb-solution

Code Review | User Role Menu for WordPress

WordPress plugin User Role Menu for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: user-role-menu-by...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 29, 2016
  • Latest release: Dec 1, 2016
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: worldwidewebsolution.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /878 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/user-role-menu-by-worldwideweb-solution/includes/class.wwws.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; plugin_wwws has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼56.30ms] Passed 4 tests

Server-side resources used by User Role Menu for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.3611.89 ▼33.21
Dashboard /wp-admin2.13 ▼1.185.99 ▼49.57
Posts /wp-admin/edit.php2.13 ▼1.236.12 ▼44.35
Add New Post /wp-admin/post-new.php2.13 ▼3.766.54 ▼98.07
Media Library /wp-admin/upload.php2.13 ▼1.106.58 ▼30.00

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 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

Checking browser requirements for User Role Menu for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▼0.242.00 ▲0.2343.58 ▲0.26
Dashboard /wp-admin2,195 ▲185.63 ▼0.0389.25 ▼5.9438.69 ▼9.95
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0641.59 ▲4.0837.64 ▼1.35
Add New Post /wp-admin/post-new.php1,526 ▼223.00 ▲0.08660.65 ▲56.2051.72 ▲3.47
Media Library /wp-admin/upload.php1,403 ▲64.16 ▼0.0097.84 ▼6.5944.66 ▼2.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/user-role-menu-by-worldwideweb-solution/includes/class.wwws.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; plugin_wwws has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/user-role-menu-by-worldwideweb-solution/user_role_menu_wwws.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

user-role-menu-by-worldwideweb-solution/user_role_menu_wwws.php 92% from 13 tests

"User Role Menu for WordPress" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("user-role-menu-by-worldwideweb-solution.php" instead of "user_role_menu_wwws.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin468 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36945468

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin