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
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼4.96ms] Passed 4 tests
Server-side resources used by Coupons by Role
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 43.63 ▲5.57 |
Dashboard /wp-admin | 3.31 ▲0.01 | 43.39 ▼3.69 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 43.87 ▼7.98 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 90.66 ▼8.15 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 34.21 ▼0.03 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Coupons by Role
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 13.16 ▼1.13 | 1.74 ▼0.25 | 41.03 ▲0.50 |
Dashboard /wp-admin | 2,209 ▲20 | 5.90 ▲0.88 | 95.80 ▼25.48 | 37.13 ▼6.11 |
Posts /wp-admin/edit.php | 2,092 ▼0 | 1.99 ▼0.03 | 38.93 ▼0.99 | 35.01 ▼1.73 |
Add New Post /wp-admin/post-new.php | 1,514 ▼19 | 17.84 ▼5.37 | 625.22 ▼65.30 | 49.93 ▼6.84 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.20 ▲0.02 | 97.10 ▼6.58 | 41.88 ▼3.21 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- db_upgraded
- can_compress_scripts
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
SRP Passed 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test
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, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: role, group, coupon, woocommerce
woo-coupons-by-role/hide-coupon-by-role.php 77% from 13 tests
The main PHP file in "Coupons by Role" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("woo-coupons-by-role.php" instead of "hide-coupon-by-role.php")
- Text Domain: Please use dashes and lowercase characters for text domains
- Description: Please don't use more than 140 characters for the plugin description (currently 200 characters long)
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
No dangerous file extensions were detected94 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 26 | 56 | 94 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 2.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 2.00 |
Average method complexity | 1.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 2.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 | 5 | |
▷ Static methods | 5 | 100.00% |
▷ Public methods | 5 | 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 Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin