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
Install script ran successfully
Server metrics [RAM: ▲0.19MB] [CPU: ▼304.42ms] Passed 4 tests
Analyzing server-side resources used by Simple Affiliate for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.79 ▲0.27 | 59.69 ▲7.54 |
Dashboard /wp-admin | 3.62 ▲0.21 | 41.99 ▲2.30 |
Posts /wp-admin/edit.php | 3.85 ▲0.21 | 64.28 ▲23.75 |
Add New Post /wp-admin/post-new.php | 7.08 ▲0.11 | 103.43 ▼1,223.35 |
Media Library /wp-admin/upload.php | 3.50 ▲0.21 | 27.59 ▼4.18 |
Settings /wp-admin/admin.php?page=affiliate_settings | 3.47 | 27.63 |
Affiliate /wp-admin/admin.php?page=affiliate | 3.47 | 25.22 |
Server storage [IO: ▲1.95MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 45 new files
Database: 2 new tables, no new options
New tables |
---|
wp_affiliate_spending |
wp_affiliate_earnings |
Browser metrics Passed 4 tests
Simple Affiliate for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,946 ▲192 | 17.24 ▲1.49 | 12.21 ▲5.78 | 2.54 ▲0.07 |
Dashboard /wp-admin | 2,912 ▲58 | 6.00 ▼0.12 | 117.77 ▼18.20 | 155.51 ▼1.12 |
Posts /wp-admin/edit.php | 2,725 ▲31 | 3.24 ▲0.00 | 64.02 ▲1.38 | 143.59 ▲2.71 |
Add New Post /wp-admin/post-new.php | 1,683 ▼69 | 17.88 ▼3.14 | 399.53 ▼72.55 | 163.66 ▲7.69 |
Media Library /wp-admin/upload.php | 1,732 ▲34 | 5.50 ▼0.01 | 141.59 ▼3.31 | 193.42 ▼19.21 |
Settings /wp-admin/admin.php?page=affiliate_settings | 1,122 | 2.41 | 76.09 | 134.93 |
Affiliate /wp-admin/admin.php?page=affiliate | 989 | 2.36 | 56.20 | 86.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- The plugin did not uninstall successfully, leaving 2 tables in the database
- wp_affiliate_spending
- wp_affiliate_earnings
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
- 9× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-affiliate-for-woocommerce/templates/affiliate/user-edit.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/simple-affiliate-for-woocommerce/templates/affiliate/affiliate-form.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-affiliate-for-woocommerce/includes/class-wc-simple-affiliate-dashboard.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-affiliate-for-woocommerce/includes/class-wc-simple-affiliate-user.php:18
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-affiliate-for-woocommerce/includes/class-wc-simple-affiliate-history.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-affiliate-for-woocommerce/includes/class-wc-simple-affiliate.php:18
- > PHP Notice
Undefined variable: balance in wp-content/plugins/simple-affiliate-for-woocommerce/templates/affiliate/balance.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-affiliate-for-woocommerce/includes/class-wc-simple-affiliate-settings.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-affiliate-for-woocommerce/templates/affiliate/dashboard.php:8
- > 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 errors were detected
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
- Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in simple-affiliate-for-woocommerce/assets to your readme.txt
simple-affiliate-for-woocommerce/simple-affiliate-woocommerce.php 77% from 13 tests
The main file in "Simple Affiliate for WooCommerce" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("simple-affiliate-for-woocommerce.php" instead of "simple-affiliate-woocommerce.php")
- Requires at least: Required version must be the same as the one declared in readme.txt ("5.3" instead of "5.5.1")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin26,275 lines of code in 27 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 5 | 468 | 1,658 | 19,948 |
CSS | 9 | 186 | 332 | 5,163 |
PHP | 11 | 202 | 364 | 1,144 |
Markdown | 2 | 9 | 0 | 20 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 15.17 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 45.00 |
Average method complexity | 2.73 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 49 | |
▷ Static methods | 16 | 32.65% |
▷ Public methods | 49 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/vendor/jquery-ui/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
assets/vendor/jquery-ui/themes/ui-lightness/images/ui-icons_222222_256x240.png | 6.76KB | 4.17KB | ▼ 38.24% |
assets/vendor/jquery-ui/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png | 0.26KB | 0.12KB | ▼ 53.44% |
assets/vendor/jquery-ui/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png | 0.30KB | 0.15KB | ▼ 49.68% |
assets/vendor/jquery-ui/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png | 0.34KB | 0.16KB | ▼ 54.02% |