Benchmarks
Plugin footprint 46% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲6.99MB] [CPU: ▲37.90ms] 25% from 4 tests
Analyzing server-side resources used by WooCommerce Affiliate Plugin - Coupon Affiliates
Please take the time to fix the following items
- RAM: Try to keep total memory usage under 10MB (currently 10.53MB on /wp-admin/admin.php?page=wcusage_setup)
- CPU: Total CPU usage should be kept under 500.00ms (currently 2,808.58ms on /wp-admin/admin.php?page=wcusage_help)
- Extra RAM: Extra memory usage should kept under 5MB (currently 6.99MB on /wp-admin/admin.php?page=wcusage_setup)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 10.10 ▲6.63 | 67.68 ▲20.58 |
Dashboard /wp-admin | 10.68 ▲7.38 | 95.32 ▲46.13 |
Posts /wp-admin/edit.php | 10.74 ▲7.38 | 107.38 ▲62.52 |
Add New Post /wp-admin/post-new.php | 12.52 ▲6.63 | 111.31 ▲22.35 |
Media Library /wp-admin/upload.php | 10.54 ▲7.31 | 96.08 ▲63.33 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 10.78 | 81.38 |
Info & Help /wp-admin/admin.php?page=wcusage_help | 10.58 | 2,808.58 |
Setup Wizard /wp-admin/admin.php?page=wcusage_setup | 10.53 | 79.67 |
Server storage [IO: ▲11.90MB] [DB: ▲0.01MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 302 new files
Database: 3 new tables, 17 new options
New tables |
---|
wp_wcusage_activity |
wp_wcusage_register |
wp_wcusage_clicks |
New WordPress options |
---|
wcusage_options |
fs_active_plugins |
wcusage_register_db_version |
wcusage_update_notice_dismissed_version |
can_compress_scripts |
fs_accounts |
widget_recent-comments |
theysaidso_admin_options |
wcusage_activity_db_version |
wcusage_update_notice_dismissed |
... |
Browser metrics Passed 4 tests
A check of browser resources used by WooCommerce Affiliate Plugin - Coupon Affiliates
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,478 ▼269 | 14.20 ▼0.04 | 0.43 ▼1.15 | 6.42 ▼37.39 |
Dashboard /wp-admin | 2,213 ▲38 | 5.56 ▼0.14 | 96.60 ▼1.67 | 72.87 ▲36.20 |
Posts /wp-admin/edit.php | 2,131 ▲31 | 1.96 ▼0.02 | 34.34 ▼4.78 | 31.77 ▼3.49 |
Add New Post /wp-admin/post-new.php | 45 ▼1,481 | 0.41 ▼22.91 | 0.08 ▼613.47 | 9.33 ▼49.78 |
Media Library /wp-admin/upload.php | 1,433 ▲30 | 4.21 ▲0.03 | 112.70 ▲13.04 | 79.85 ▲36.17 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 1,098 | 1.66 | 25.18 | 30.18 |
Info & Help /wp-admin/admin.php?page=wcusage_help | 1,482 | 2.13 | 25.92 | 80.17 |
Setup Wizard /wp-admin/admin.php?page=wcusage_setup | 1,027 | 2.02 | 28.42 | 36.40 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/woo-coupon-usage/freemius/includes/class-freemius.php+8546
Undefined property: stdClass::$plugins
- The uninstall procedure failed, leaving 3 tables in the database
- wp_wcusage_register
- wp_wcusage_activity
- wp_wcusage_clicks
- The uninstall procedure has failed, leaving 17 options in the database
- wcusage_activity_db_version
- widget_recent-comments
- wcusage_custom_roles_version
- wcusage_register_db_version
- wcusage_options
- db_upgraded
- can_compress_scripts
- fs_active_plugins
- recovery_mode_email_last_sent
- wcusage_update_notice_dismissed_version
- ...
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
- 4× 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/woo-coupon-usage/inc/api/coupon-info.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function wcu_fs() in wp-content/plugins/woo-coupon-usage/inc/api/request-payout.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-coupon-usage/inc/api/users-coupons.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-coupon-usage/inc/admin-reports/ajax-admin-reports.php:40
- > 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)
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: affiliates woocommerce, woocommerce affiliate, affiliate program, affiliates, affiliate
woo-coupon-usage/woo-coupon-usage.php 85% from 13 tests
The entry point to "WooCommerce Affiliate Plugin - Coupon Affiliates" version 5.11.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)
- Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "3.7")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected133,726 lines of code in 233 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 8 | 15,672 | 22,575 | 65,438 |
PHP | 200 | 13,873 | 19,805 | 59,133 |
CSS | 17 | 3,157 | 111 | 8,646 |
JavaScript | 8 | 78 | 98 | 509 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
- Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 80.97 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,096.00 |
Average method complexity | 4.63 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 58 | |
▷ Abstract classes | 2 | 3.45% |
▷ Concrete classes | 56 | 96.55% |
▷ Final classes | 0 | 0.00% |
Methods | 1,328 | |
▷ Static methods | 200 | 15.06% |
▷ Public methods | 928 | 69.88% |
▷ Protected methods | 17 | 1.28% |
▷ Private methods | 383 | 28.84% |
Functions | 462 | |
▷ Named functions | 450 | 97.40% |
▷ Anonymous functions | 12 | 2.60% |
Constants | 149 | |
▷ Global constants | 101 | 67.79% |
▷ Class constants | 48 | 32.21% |
▷ Public constants | 48 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.22MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/icon.png | 0.50KB | 0.81KB | 0.00% |
images/coupon-affiliates-logo.png | 82.24KB | 15.48KB | ▼ 81.18% |
images/us.png | 0.31KB | 0.31KB | 0.00% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
images/gb.png | 0.31KB | 0.31KB | ▼ 1.26% |