Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.04MB] [CPU: ▼153.73ms] Passed 4 tests
This is a short check of server-side resources used by Role Content Restriction
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.88 ▲0.04 | 38.79 ▲2.80 |
Dashboard /wp-admin | 3.10 ▲0.05 | 44.58 ▼4.36 |
Posts /wp-admin/edit.php | 3.15 ▲0.04 | 44.91 ▲6.09 |
Add New Post /wp-admin/post-new.php | 5.47 ▲0.04 | 104.95 ▼610.36 |
Media Library /wp-admin/upload.php | 3.04 ▲0.03 | 37.60 ▼2.99 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Role Content Restriction
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,679 ▲83 | 16.22 ▲0.67 | 11.19 ▼2.22 | 48.78 ▼13.90 |
Dashboard /wp-admin | 2,970 ▲39 | 6.02 ▲0.09 | 150.00 ▼9.98 | 111.98 ▲2.71 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.72 ▲0.01 | 68.88 ▼1.95 | 96.77 ▲5.02 |
Add New Post /wp-admin/post-new.php | 1,739 ▼1,906 | 18.25 ▼0.41 | 399.13 ▼106.66 | 115.41 ▲3.59 |
Media Library /wp-admin/upload.php | 1,807 ▼0 | 5.03 ▲0.02 | 156.22 ▼6.14 | 116.94 ▼12.31 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 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
Almost there! Just fix the following items
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/role-content-restriction/role-content-restriction.php:20
- > PHP Fatal error
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)
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
- Screenshots: Please add descriptions for these screenshots #1, #2, #3 in role-content-restriction/assets to your readme.txt
role-content-restriction/role-content-restriction.php Passed 13 tests
The entry point to "Role Content Restriction" version 1.0.0 is a PHP file that has certain tags in its header comment area
60 characters long description:
Restricts access to selected post types based on user roles.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected184 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 68 | 140 | 154 |
PO File | 1 | 5 | 5 | 30 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 28.00 |
▷ Minimum class complexity | 28.00 |
▷ Maximum class complexity | 28.00 |
Average method complexity | 4.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.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 | 9 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 7 | 77.78% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 22.22% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin