Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲1.52MB] [CPU: ▼1.27ms] Passed 4 tests
A check of server-side resources used by WC Affiliate – A Full-fledged Affiliate Manager for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.45 ▲0.98 | 49.92 ▲4.94 |
Dashboard /wp-admin | 5.00 ▲1.66 | 65.82 ▼5.41 |
Posts /wp-admin/edit.php | 5.12 ▲1.77 | 64.88 ▲0.59 |
Add New Post /wp-admin/post-new.php | 7.62 ▲1.74 | 108.87 ▼5.19 |
Media Library /wp-admin/upload.php | 4.93 ▲1.70 | 53.84 ▲16.15 |
Settings /wp-admin/admin.php?page=wc-affiliate-settings | 5.06 | 58.92 |
Transactions /wp-admin/admin.php?page=transactions | 4.97 | 72.37 |
Payables /wp-admin/admin.php?page=payables | 4.97 | 51.00 |
Referrals /wp-admin/admin.php?page=referrals | 4.98 | 50.06 |
Affiliates /wp-admin/admin.php?page=affiliates | 4.98 | 49.72 |
Banners /wp-admin/admin.php?page=banners | 4.91 | 49.67 |
Summary /wp-admin/admin.php?page=wc-affiliate | 4.97 | 51.00 |
Visits /wp-admin/admin.php?page=visits | 4.97 | 54.02 |
Server storage [IO: ▲3.49MB] [DB: ▲0.08MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 330 new files
Database: 3 new tables, 11 new options
New tables |
---|
wp_wca_transactions |
wp_wca_visits |
wp_wca_referrals |
New WordPress options |
---|
pl-survey_wc-affiliate-activated |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
wc_affiliate_basic |
can_compress_scripts |
wc-affiliate_setup |
db_upgraded |
widget_recent-posts |
wc-affiliate-docs-json |
... |
Browser metrics Passed 4 tests
A check of browser resources used by WC Affiliate – A Full-fledged Affiliate Manager for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,346 ▲585 | 16.27 ▲2.00 | 47.79 ▲45.94 | 42.77 ▼1.02 |
Dashboard /wp-admin | 2,352 ▲175 | 4.91 ▼0.69 | 93.09 ▲1.10 | 41.43 ▲0.55 |
Posts /wp-admin/edit.php | 2,214 ▲114 | 2.32 ▲0.35 | 42.26 ▼1.73 | 36.06 ▼2.96 |
Add New Post /wp-admin/post-new.php | 1,635 ▲109 | 23.19 ▲0.01 | 609.09 ▼23.25 | 33.06 ▼27.80 |
Media Library /wp-admin/upload.php | 1,516 ▲116 | 4.39 ▲0.20 | 93.68 ▼20.10 | 45.93 ▼2.26 |
Settings /wp-admin/admin.php?page=wc-affiliate-settings | 5,364 | 21.10 | 649.16 | 106.81 |
Transactions /wp-admin/admin.php?page=transactions | 1,265 | 2.14 | 35.62 | 35.66 |
Payables /wp-admin/admin.php?page=payables | 1,215 | 2.16 | 32.38 | 33.37 |
Referrals /wp-admin/admin.php?page=referrals | 1,338 | 2.15 | 35.00 | 33.11 |
Affiliates /wp-admin/admin.php?page=affiliates | 1,210 | 2.07 | 29.32 | 28.97 |
Banners /wp-admin/admin.php?page=banners | 951 | 1.85 | 32.15 | 56.93 |
Summary /wp-admin/admin.php?page=wc-affiliate | 1,161 | 2.03 | 29.89 | 32.05 |
Visits /wp-admin/admin.php?page=visits | 1,216 | 2.05 | 31.45 | 33.11 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.09MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- This plugin does not fully uninstall, leaving 3 tables in the database
- wp_wca_transactions
- wp_wca_referrals
- wp_wca_visits
- This plugin does not fully uninstall, leaving 10 options in the database
- db_upgraded
- widget_theysaidso_widget
- wc_affiliate_basic
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
- wc-affiliate_setup
- wc-affiliate-docs-json
- wc-affiliate_survey
- widget_recent-posts
Smoke tests 25% 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 0% from 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
Almost there! Just fix the following items
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/wc-affiliate/trunk/views/loader.php
- > /wp-content/plugins/wc-affiliate/views/loader.php
- 112× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wc-affiliate/trunk/views/front/shortcodes/dashboard/tabs/referrals.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-affiliate/trunk/views/placeholders/banners.php:12
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wc-affiliate/inc/functions.php on line 5
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wc-affiliate/trunk/views/front/shortcodes/dashboard/tabs/transactions.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wc-affiliate/trunk/views/front/authenticate/rejected.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-affiliate/views/placeholders/multilevel-commission.php:10
- > PHP Fatal error
Uncaught Error: Class 'Codexpert\\WC_Affiliate\\Helper' not found in wp-content/plugins/wc-affiliate/trunk/views/front/shortcodes/dashboard/navigation.php:4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wc-affiliate/views/front/shortcodes/dashboard/tabs/transactions.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-affiliate/views/admin/user/transaction-form.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function current_time() in wp-content/plugins/wc-affiliate/views/admin/menus/transactions.php:3
- > PHP Warning
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=referrals
- > Network (severe)
wp-content/plugins/wc-affiliate/assets/css/chosen-sprite.png - Failed to load resource: the server responded with a status of 404 (Not 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: woocommerce, affiliate marketing, affiliate management, woocommerce affiliate, affiliates
wc-affiliate/wc-affiliate.php 85% from 13 tests
"WC Affiliate – A Full-fledged Affiliate Manager for WooCommerce" version 2.2.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
- Domain Path: The domain path folder does not exist ("/languages")
- Git Repository: Please remove the Git repository from this plugin
Code Analysis Passed 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
Success! There were no dangerous files found in this plugin16,323 lines of code in 140 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 96 | 2,362 | 2,183 | 10,678 |
CSS | 18 | 65 | 226 | 4,123 |
JavaScript | 14 | 118 | 46 | 1,125 |
JSON | 7 | 0 | 0 | 318 |
Markdown | 4 | 15 | 0 | 56 |
YAML | 1 | 1 | 0 | 23 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 39.61 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 228.00 |
Average method complexity | 4.10 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 43.00 |
Code structure | ||
---|---|---|
Namespaces | 7 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 72 | |
▷ Abstract classes | 4 | 5.56% |
▷ Concrete classes | 68 | 94.44% |
▷ Final classes | 2 | 2.94% |
Methods | 898 | |
▷ Static methods | 142 | 15.81% |
▷ Public methods | 868 | 96.66% |
▷ Protected methods | 4 | 0.45% |
▷ Private methods | 26 | 2.90% |
Functions | 52 | |
▷ Named functions | 34 | 65.38% |
▷ Anonymous functions | 18 | 34.62% |
Constants | 12 | |
▷ Global constants | 12 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
40 PNG files occupy 1.61MB with 0.86MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
trunk/assets/img/holiday-deals.png | 203.19KB | 58.85KB | ▼ 71.04% |
trunk/assets/img/connect.png | 7.02KB | 2.46KB | ▼ 64.95% |
vendor/codexpert/plugin/src/assets/img/checked.png | 18.81KB | 9.90KB | ▼ 47.36% |
assets/img/unpaid-commissions.png | 0.80KB | 0.42KB | ▼ 47.93% |
assets/img/paid-commissions.png | 0.59KB | 0.38KB | ▼ 35.27% |