90% user-role-adjustments

Code Review | User Role Adjustments

WordPress plugin User Role Adjustments scored90%from 54 tests.

About plugin

  • Plugin page: user-role-adjustm...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5
  • WordPress version: 6.3.1
  • First release: Aug 24, 2020
  • Latest release: Nov 19, 2020
  • Number of updates: 12
  • Update frequency: every 7.4 days
  • Top authors: designzillas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /387 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.10MB] [CPU: ▼1.22ms] Passed 4 tests

This is a short check of server-side resources used by User Role Adjustments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1036.79 ▼3.80
Dashboard /wp-admin3.40 ▲0.1055.25 ▲4.64
Posts /wp-admin/edit.php3.51 ▲0.1646.92 ▲2.83
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.09 ▼6.33
Media Library /wp-admin/upload.php3.32 ▲0.0933.52 ▲2.41

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by User Role Adjustments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.40 ▲0.051.78 ▲0.0144.44 ▼0.01
Dashboard /wp-admin2,195 ▲155.61 ▼0.0490.63 ▼1.1240.76 ▼5.21
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0533.36 ▼3.4135.36 ▼6.22
Add New Post /wp-admin/post-new.php1,535 ▲918.09 ▼5.04593.56 ▼86.3066.44 ▲6.28
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.0495.78 ▲0.5345.69 ▲3.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: utility admin, super editor

user-role-adjustments/user-role-adjustments.php Passed 13 tests

"User Role Adjustments" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
59 characters long description:
Adds "Super Editor" and "Utility Administrator" user roles.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin8,638 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JSON5007,921
PHP13126386527
Markdown127055
JavaScript285751
XML1266646
Sass32138

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods42
▷ Static methods1330.95%
▷ Public methods4095.24%
▷ Protected methods00.00%
▷ Private methods24.76%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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
PNG images were not found in this plugin