Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼139.21ms] Passed 4 tests
Server-side resources used by Setup of roles
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 36.22 ▲12.80 |
Dashboard /wp-admin | 3.06 ▲0.01 | 44.41 ▲3.12 |
Posts /wp-admin/edit.php | 3.11 ▲0.01 | 47.29 ▲1.61 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.02 | 91.26 ▼568.16 |
Media Library /wp-admin/upload.php | 3.00 ▲0.00 | 40.37 ▲6.61 |
Setup of roles /wp-admin/options-general.php?page=setup-of-roles/setup_of_roles_page.php | 3.04 | 31.69 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Setup of roles
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,686 ▲90 | 15.86 ▲0.35 | 9.39 ▼0.51 | 49.86 ▼1.89 |
Dashboard /wp-admin | 2,980 ▲46 | 6.09 ▲0.10 | 145.06 ▼10.07 | 111.35 ▼3.68 |
Posts /wp-admin/edit.php | 2,746 ▲7 | 2.70 ▲0.01 | 71.13 ▼2.25 | 83.71 ▼11.92 |
Add New Post /wp-admin/post-new.php | 1,688 ▲5 | 18.72 ▲0.02 | 401.04 ▼18.98 | 110.77 ▲2.91 |
Media Library /wp-admin/upload.php | 1,817 ▲10 | 5.01 ▲0.02 | 171.80 ▲10.51 | 118.21 ▼5.60 |
Setup of roles /wp-admin/options-general.php?page=setup-of-roles/setup_of_roles_page.php | 3,719 | 2.09 | 68.39 | 77.83 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
- 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Notice
Trying to get property 'role_objects' of non-object in wp-content/plugins/setup-of-roles/setup_of_roles_page.php on line 32
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/setup-of-roles/setup_of_roles_page.php on line 32
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/setup-of-roles/setup_of_roles_page.php on line 18
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/setup-of-roles/setup_of_roles_page.php on line 32
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/setup-of-roles/setup_of_roles_page.php on line 32
- > PHP Notice
Trying to get property 'role_objects' of non-object in wp-content/plugins/setup-of-roles/setup_of_roles_page.php on line 32
- > PHP Notice
Trying to get property 'role_objects' of non-object in wp-content/plugins/setup-of-roles/setup_of_roles_page.php on line 32
- > PHP Notice
Trying to get property 'role_objects' of non-object in wp-content/plugins/setup-of-roles/setup_of_roles_page.php on line 32
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/setup-of-roles/setup_of_roles_page.php on line 32
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/setup-of-roles/setup_of_roles_page.php:87
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: Screenshot #1 (screenshot-1.png "Setup of roles" WordPress plugin) image missing
setup-of-roles/setup_of_roles.php 92% from 13 tests
The main PHP file in "Setup of roles" ver. 0.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("setup-of-roles.php" instead of "setup_of_roles.php")
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 detected205 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 11 | 18 | 126 |
PO File | 1 | 13 | 14 | 46 |
CSS | 1 | 8 | 0 | 33 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 3 | 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
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 54.44KB | 15.38KB | ▼ 71.75% |