90% multisite-user-role-manager

Code Review | Multisite User Role Manager

WordPress plugin Multisite User Role Manager scored 90% from 54 tests.

About plugin

  • Plugin page: multisite-user-ro...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2015
  • Latest release: Nov 7, 2017
  • Number of updates: 20
  • Update frequency: every 36.8 days
  • Top authors: ozthegreat (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 24,870 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.76ms] Passed 4 tests

Server-side resources used by Multisite User Role Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.72 ▼0.83
Dashboard /wp-admin3.31 ▲0.0144.60 ▼4.53
Posts /wp-admin/edit.php3.36 ▲0.0051.53 ▲3.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.89 ▼23.21
Media Library /wp-admin/upload.php3.23 ▲0.0034.01 ▲1.54

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Multisite User Role Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.32 ▼1.051.73 ▼0.1740.43 ▼2.45
Dashboard /wp-admin2,209 ▲215.88 ▲1.01133.71 ▲28.2457.79 ▲15.81
Posts /wp-admin/edit.php2,092 ▼02.16 ▲0.1044.72 ▲3.8939.72 ▲6.39
Add New Post /wp-admin/post-new.php1,542 ▲2118.27 ▼5.15631.88 ▲38.6352.00 ▼0.35
Media Library /wp-admin/upload.php1,379 ▼34.15 ▼0.0397.54 ▼2.0343.96 ▼0.26

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: wpmu, management, users, roles, multisite

multisite-user-role-manager/multisite-user-role-manager.php Passed 13 tests

"Multisite User Role Manager" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
67 characters long description:
Manage user roles for each blog from a single screen on WPMU setups

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
Success! There were no dangerous files found in this plugin3,419 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript48051,9172,754
PHP7181542485
CSS24026180

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.75
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods3288.89%
▷ Protected methods00.00%
▷ Private methods411.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/jqueryui-editable/img/clear.png0.50KB0.38KB▼ 22.59%