Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼12.97ms] Passed 4 tests
Analyzing server-side resources used by Role Based Redirect
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 38.97 ▼9.08 |
Dashboard /wp-admin | 3.33 ▼0.01 | 50.25 ▼12.69 |
Posts /wp-admin/edit.php | 3.38 ▲0.03 | 47.81 ▼1.44 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 82.39 ▼27.64 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 37.13 ▼2.48 |
Server storage [IO: ▲1.24MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_rbrurls_redirect |
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
Role Based Redirect: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,811 ▲65 | 13.56 ▼0.82 | 2.04 ▲0.32 | 42.47 ▼0.57 |
Dashboard /wp-admin | 2,220 ▲32 | 5.86 ▲0.96 | 106.53 ▼7.26 | 70.42 ▲30.71 |
Posts /wp-admin/edit.php | 2,097 ▲8 | 2.05 ▲0.04 | 38.30 ▼1.76 | 33.66 ▼4.80 |
Add New Post /wp-admin/post-new.php | 1,529 ▲15 | 23.15 ▲5.48 | 702.36 ▲82.22 | 52.46 ▲3.89 |
Media Library /wp-admin/upload.php | 1,399 ▲17 | 4.07 ▼0.15 | 97.23 ▼0.37 | 72.42 ▲30.75 |
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
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/role-based-redirect/includes/redirect.php
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)
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% 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
These attributes need your attention:
- Screenshots: Screenshot #1 (Admin page setting and layout) image not found
- Requires at least: The plugin version is formatted incorrectly
role-based-redirect/role-based-redirect.php Passed 13 tests
"Role Based Redirect" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
133 characters long description:
Redirect users to specific page after login, based on their the role and also option for hide adminbar and restrict dashboard access.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin321 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 6 | 20 | 310 |
CSS | 1 | 0 | 0 | 11 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 18.00 |
▷ Minimum class complexity | 18.00 |
▷ Maximum class complexity | 18.00 |
Average method complexity | 3.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.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 | 8 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 8 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 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 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 1.16MB with 0.70MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
banner-772x250.png | 1,165.14KB | 497.28KB | ▼ 57.32% |
icon-128x128.png | 26.00KB | 15.22KB | ▼ 41.45% |
images/icon.png | 1.02KB | 0.18KB | ▼ 81.95% |