Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼290.89ms] Passed 4 tests
A check of server-side resources used by Add User Role
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.04 | 51.90 ▼1.75 |
Dashboard /wp-admin | 3.45 ▲0.05 | 34.23 ▼3.72 |
Posts /wp-admin/edit.php | 3.68 ▲0.04 | 37.29 ▲0.19 |
Add New Post /wp-admin/post-new.php | 6.92 ▼0.05 | 93.11 ▼1,156.29 |
Media Library /wp-admin/upload.php | 3.33 ▲0.03 | 23.91 ▼1.79 |
My Role /wp-admin/users.php?page=my-unique-identifier | 3.30 | 22.72 |
Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Add User Role: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,801 ▲79 | 16.31 ▲0.76 | 7.04 ▲1.33 | 2.43 ▼0.15 |
Dashboard /wp-admin | 2,930 ▲75 | 7.03 ▲0.86 | 119.21 ▼11.78 | 173.15 ▼3.26 |
Posts /wp-admin/edit.php | 2,732 ▲44 | 3.32 ▲0.09 | 71.95 ▲6.53 | 156.98 ▲18.53 |
Add New Post /wp-admin/post-new.php | 1,689 ▲29 | 16.52 ▼0.49 | 410.91 ▼2.20 | 188.90 ▲34.23 |
Media Library /wp-admin/upload.php | 1,736 ▲38 | 6.01 ▲0.49 | 128.44 ▼7.96 | 198.74 ▲4.93 |
My Role /wp-admin/users.php?page=my-unique-identifier | 1,384 | 3.77 | 75.48 | 143.44 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
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 take a closer look at the following
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-user-role/ajax/ajax.php:8
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
- > GET request to /wp-admin/users.php?page=my-unique-identifier
- > Network (severe)
wp-content/plugins/add-user-role/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: editor, user roll, user role, colon, admin...
add-user-role/userrole.php 92% from 13 tests
Analyzing the main PHP file in "Add User Role" version 0.0.1
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-user-role.php" instead of "userrole.php")
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
There were no executable files found in this plugin2,554 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 2 | 41 | 51 | 1,185 |
JavaScript | 2 | 150 | 109 | 1,108 |
PHP | 2 | 40 | 11 | 261 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.15 |
Average class complexity | 5.00 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 5.00 |
Average method complexity | 1.80 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 6 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 6 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/images/text-box.png | 0.25KB | 0.24KB | ▼ 4.31% |
css/images/ui-bg_flat_0_aaaaaa_40x100.png | 0.25KB | 0.08KB | ▼ 65.34% |
css/images/ui-icons_222222_256x240.png | 6.84KB | 4.18KB | ▼ 38.88% |
screenshot-1.png | 44.40KB | 15.98KB | ▼ 64.02% |
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png | 0.31KB | 0.18KB | ▼ 42.95% |