Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼3.41ms] Passed 4 tests
A check of server-side resources used by APIExperts Square for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 38.89 ▼0.21 |
Dashboard /wp-admin | 3.32 ▲0.01 | 45.91 ▼2.75 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 47.31 ▼0.57 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 82.93 ▼10.10 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 37.35 ▲0.95 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 3.01 | 24.00 |
Server storage [IO: ▲8.09MB] [DB: ▲0.01MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 481 new files
Database: no new tables, 11 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
db_upgraded |
fs_accounts |
activate_modules_woosquare_plus |
widget_recent-posts |
theysaidso_admin_options |
fs_active_plugins |
widget_theysaidso_widget |
fs_debug_mode |
... |
Browser metrics Passed 4 tests
A check of browser resources used by APIExperts Square for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 1,469 ▼1,317 | 12.39 ▼2.14 | 1.91 ▲0.20 | 41.61 ▲2.29 |
Dashboard /wp-admin | 2,186 ▲15 | 5.56 ▼0.01 | 83.50 ▼1.53 | 52.51 ▲11.79 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 1.98 ▼0.01 | 36.72 ▲2.15 | 31.51 ▼5.36 |
Add New Post /wp-admin/post-new.php | 1,535 ▲6 | 22.81 ▼0.19 | 638.93 ▼18.45 | 36.44 ▼21.54 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.20 ▲0.03 | 108.20 ▲16.12 | 46.24 ▲3.73 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 28 | 0.42 | 0.10 | 3.88 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- Zombie WordPress options detected upon uninstall: 11 options
- square_payment_begin_time
- fs_debug_mode
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- fs_active_plugins
- fs_accounts
- activate_modules_woosquare_plus
- ...
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
The following issues need your attention
- 5× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/woosquare/admin/partials/woosquare-plus-admin-display.php
- > /wp-content/plugins/woosquare/admin/modules/product-sync/_inc/admin/pages.php
- > /wp-content/plugins/woosquare/admin/modules/product-sync/_inc/admin/ajax.php
- > /wp-content/plugins/woosquare/admin/modules/product-sync/views/partials/cat-display.php
- > /wp-content/plugins/woosquare/public/partials/woosquare-plus-public-display.php
- 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woosquare/admin/modules/square-payments/SquarePlusApplePayGateway.class.php:3
- > PHP Notice
Undefined index: page in wp-content/plugins/woosquare/admin/partials/settings.php on line 84
- > PHP Notice
Undefined variable: successMessage in wp-content/plugins/woosquare/admin/partials/settings.php on line 3
- > PHP Notice
Undefined variable: successMessage in wp-content/plugins/woosquare/admin/modules/product-sync/views/settings.php on line 2
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/woosquare/admin/modules/product-sync/views/partials/cat-display.php on line 12
- > PHP Notice
Undefined variable: targetObject in wp-content/plugins/woosquare/admin/modules/product-sync/views/partials/cat-display.php on line 7
- > PHP Warning
uasort() expects parameter 1 to be array, null given in wp-content/plugins/woosquare/admin/modules/product-sync/views/partials/cat-display.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woosquare/admin/partials/settings.php:89
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/woosquare/admin/modules/product-sync/views/logs.php:6
- > PHP Fatal error
Uncaught Error: Class 'Woosquare_Plus' not found in wp-content/plugins/woosquare/admin/modules/square-payments/views/payment-settings.php:6
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
- > GET request to /wp-admin/admin.php?page=freemius
- > Network (severe)
wp-admin/admin.php?page=freemius - Failed to load resource: the server responded with a status of 403 (Forbidden)
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: No descriptions were found for these screenshots #10, #11, #12, #4, #5, #6, #7, #8, #9 in woosquare/assets to your readme.txt
woosquare/woocommerce-square-integration.php 85% from 13 tests
The principal PHP file in "APIExperts Square for WooCommerce" v. 4.2.9 is loaded by WordPress automatically on each request
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woosquare.php" instead of "woocommerce-square-integration.php")
- Description: The description should be shorter than 140 characters (currently 155 characters long)
Code Analysis 95% from 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
No dangerous file extensions were detected68,583 lines of code in 218 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 162 | 12,383 | 20,395 | 46,371 |
CSS | 26 | 1,351 | 31 | 11,108 |
Sass | 1 | 167 | 879 | 9,214 |
JavaScript | 19 | 466 | 317 | 1,641 |
Markdown | 1 | 68 | 0 | 214 |
JSON | 1 | 0 | 0 | 27 |
SVG | 8 | 0 | 0 | 8 |
PHP code 0% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please fix the following
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 103)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 89.37 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 103.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 125 | |
▷ Abstract classes | 4 | 3.20% |
▷ Concrete classes | 121 | 96.80% |
▷ Final classes | 0 | 0.00% |
Methods | 2,843 | |
▷ Static methods | 436 | 15.34% |
▷ Public methods | 2,030 | 71.40% |
▷ Protected methods | 50 | 1.76% |
▷ Private methods | 763 | 26.84% |
Functions | 240 | |
▷ Named functions | 238 | 99.17% |
▷ Anonymous functions | 2 | 0.83% |
Constants | 359 | |
▷ Global constants | 235 | 65.46% |
▷ Class constants | 124 | 34.54% |
▷ Public constants | 124 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
26 PNG files occupy 0.23MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
admin/img/cardonfile2.png | 9.12KB | 3.71KB | ▼ 59.37% |
includes/freemius/assets/img/woosquare.png | 9.16KB | 5.26KB | ▼ 42.58% |
admin/modules/square-payments/img/cc-icon/china_unionpay.png | 36.35KB | 14.71KB | ▼ 59.53% |
admin/img/connect-bg.png | 44.66KB | 14.71KB | ▼ 67.07% |