84% multiple-roles

Code Review | Multiple Roles

WordPress plugin Multiple Roles scored84%from 54 tests.

About plugin

  • Plugin page: multiple-roles
  • Plugin version: 1.3.7
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0
  • WordPress version: 6.3.1
  • First release: Mar 12, 2015
  • Latest release: Jun 2, 2022
  • Number of updates: 23
  • Update frequency: every 114.7 days
  • Top authors: Mista-Flo (65.22%)cneumann (26.09%)SeventhSteel (17.39%)

Code review

54 tests

User reviews

13 reviews

Install metrics

6,000+ active /62,882 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.44ms] Passed 4 tests

Server-side resources used by Multiple Roles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.27 ▼2.42
Dashboard /wp-admin3.36 ▲0.0546.08 ▼3.56
Posts /wp-admin/edit.php3.47 ▲0.1146.48 ▼3.54
Add New Post /wp-admin/post-new.php5.94 ▲0.0599.08 ▲5.42
Media Library /wp-admin/upload.php3.28 ▲0.0534.26 ▼0.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Multiple Roles
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.72 ▼0.862.12 ▲0.2043.13 ▼3.46
Dashboard /wp-admin2,203 ▲154.85 ▼1.0294.24 ▼23.1439.96 ▼7.86
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0639.66 ▼0.7933.07 ▲1.23
Add New Post /wp-admin/post-new.php1,514 ▼517.56 ▼5.92602.03 ▼94.5551.69 ▼3.39
Media Library /wp-admin/upload.php1,388 ▲34.19 ▲0.0095.89 ▼5.7441.28 ▼2.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/multiple-roles/views/checklist.html.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/multiple-roles/multiple-roles.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/multiple-roles/views/column.html.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 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
10 plugin tags: more than one role for each user, more than one role, more than one role per user, user roles, edit roles...

multiple-roles/multiple-roles.php Passed 13 tests

The main PHP file in "Multiple Roles" ver. 1.3.7 adds more information about the plugin and also serves as the entry point for this plugin
47 characters long description:
Allow users to have multiple roles on one site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected250 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP666179245
JavaScript1135

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.67
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin