84% multiple-roles-per-user

Code Review | Multiple Roles per User

WordPress plugin Multiple Roles per User scored 84% from 54 tests.

About plugin

  • Plugin page: multiple-roles-pe...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 27, 2015
  • Latest release: Jun 27, 2015
  • Number of updates: 4
  • Update frequency: every 9.8 days
  • Top authors: jemoreto (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 1,439 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.81ms] Passed 4 tests

This is a short check of server-side resources used by Multiple Roles per User
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.36 ▼4.96
Dashboard /wp-admin3.34 ▲0.0352.97 ▼1.58
Posts /wp-admin/edit.php3.39 ▲0.0349.69 ▲2.38
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.55 ▼7.02
Media Library /wp-admin/upload.php3.26 ▲0.0334.07 ▼1.68

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Multiple Roles per User: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.131.91 ▲0.1442.69 ▼8.47
Dashboard /wp-admin2,203 ▲155.84 ▼0.0496.86 ▼4.9537.93 ▼6.41
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0139.31 ▼3.6337.35 ▼0.55
Add New Post /wp-admin/post-new.php1,520 ▲623.42 ▲5.85680.07 ▲64.7060.95 ▲6.04
Media Library /wp-admin/upload.php1,385 ▼34.21 ▼0.0397.85 ▲2.8141.60 ▼3.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multiple-roles-per-user/multiple-roles-per-user.php:40

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Contributors: Plugin contributors not specified
The official readme.txt might help

multiple-roles-per-user/multiple-roles-per-user.php 92% from 13 tests

"Multiple Roles per User" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 305 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin127 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12443127

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
No PNG images were found in this plugin