Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.01MB] [CPU: ▼2.78ms] Passed 4 tests
A check of server-side resources used by Coupon By Roles For WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 34.25 ▼3.21 |
Dashboard /wp-admin | 3.31 ▲0.01 | 44.01 ▼4.89 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 43.84 ▼1.86 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 105.81 ▲0.87 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 33.67 ▼1.14 |
Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Coupon By Roles For WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 14.48 ▼0.20 | 1.57 ▼0.25 | 43.35 ▼0.51 |
Dashboard /wp-admin | 2,206 ▲17 | 4.90 ▼0.11 | 104.03 ▼19.26 | 40.05 ▼8.99 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.18 ▲0.14 | 38.26 ▲1.60 | 41.66 ▲7.36 |
Add New Post /wp-admin/post-new.php | 1,528 ▲7 | 23.37 ▲0.25 | 649.38 ▼31.70 | 59.84 ▲6.49 |
Media Library /wp-admin/upload.php | 1,388 ▲3 | 4.18 ▼0.01 | 94.94 ▼0.23 | 44.48 ▲0.32 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
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
The following issues need your attention
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/coupon-by-roles-for-woocommerce/coupon-by-roles.php:14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: wooocmmerce roles, wordpress roles, coupon by roles, woocommerce coupon by roles, wooocmmerce coupon restriction...
coupon-by-roles-for-woocommerce/coupon-by-roles.php 92% from 13 tests
This is the main PHP file of "Coupon By Roles For WooCommerce" version 0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("coupon-by-roles-for-woocommerce.php" instead of "coupon-by-roles.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin122 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 35 | 67 | 122 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.54 |
Average class complexity | 29.00 |
▷ Minimum class complexity | 29.00 |
▷ Maximum class complexity | 29.00 |
Average method complexity | 5.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.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 | 7 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 7 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.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
PNG images were not found in this plugin