Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
- The plugin cannot be installed
- > Warning in wp-content/plugins/codeswholesale-for-woocommerce/codeswholesale.php+127
Use of undefined constant FILE - assumed 'FILE' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▼0.01MB] [CPU: ▼9.80ms] Passed 4 tests
Server-side resources used by CodesWholesale.com for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 40.84 ▲3.00 |
Dashboard /wp-admin | 3.31 ▼0.04 | 47.67 ▼13.70 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 44.30 ▼1.04 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 80.28 ▼26.04 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.38 ▲1.58 |
Server storage [IO: ▲2.13MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 614 new files
Database: 7 new tables, 6 new options
New tables |
---|
wp_codeswholesale_refresh_tokens |
wp_codeswholesale_import_properties |
wp_codeswholesale_currency_control |
wp_codeswholesale_access_tokens |
wp_codeswholesale_postback_import_details |
wp_codeswholesale_postback_import_properties |
wp_codeswholesale_products |
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for CodesWholesale.com for WooCommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.14 ▼0.46 | 1.84 ▲0.05 | 43.21 ▲0.86 |
Dashboard /wp-admin | 2,198 ▲20 | 5.61 ▼0.13 | 94.32 ▼5.85 | 42.18 ▲0.21 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.99 ▼0.01 | 35.60 ▼1.09 | 33.32 ▼2.48 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 23.27 ▼0.46 | 667.17 ▲0.56 | 63.63 ▲6.90 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.21 ▲0.04 | 100.65 ▲5.45 | 42.51 ▼1.00 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- Zombie tables detected upon uninstall: 7 tables
- wp_codeswholesale_products
- wp_codeswholesale_postback_import_properties
- wp_codeswholesale_import_properties
- wp_codeswholesale_postback_import_details
- wp_codeswholesale_currency_control
- wp_codeswholesale_access_tokens
- wp_codeswholesale_refresh_tokens
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/codeswholesale-for-woocommerce/vendor/codeswholesale/sdk/examples/list-order-history.php
- > /wp-content/plugins/codeswholesale-for-woocommerce/vendor/codeswholesale/sdk/examples/single-product.php
- > /wp-content/plugins/codeswholesale-for-woocommerce/vendor/codeswholesale/sdk/tests/Bootstrap.php
- 284× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/codeswholesale-for-woocommerce/vendor/codeswholesale/sdk/examples/list-order-history.php on line 8
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/codeswholesale-for-woocommerce/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
- > PHP Fatal error
Uncaught Error: Interface 'CodesWholesaleFramework\\Action' not found in wp-content/plugins/codeswholesale-for-woocommerce/vendor/codeswholesale/cw-extension-framework/src/Orders/Codes/SendCodesAction.php:32
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/codeswholesale-for-woocommerce/vendor/guzzlehttp/psr7/tests/UriTest.php:9
- > PHP Fatal error
require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/codeswholesale-for-woocommerce/vendor/codeswholesale/sdk/examples/fetch-product-import.php on line 13
- > PHP Fatal error
Uncaught Error: Class 'CodesWholesale\\Resource\\Resource' not found in wp-content/plugins/codeswholesale-for-woocommerce/vendor/codeswholesale/sdk/src/CodesWholesale/Resource/Error.php:6
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/codeswholesale-for-woocommerce/vendor/guzzlehttp/promises/src/CancellationException.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/codeswholesale-for-woocommerce/includes/admin/views/view-blocked.php:2
- > PHP Fatal error
Uncaught Error: Interface 'CodesWholesaleFramework\\Retriever\\LinkRetriever' not found in wp-content/plugins/codeswholesale-for-woocommerce/includes/retrievers/wp-links-retriever.php:5
- > PHP Warning
Use of undefined constant STDERR - assumed 'STDERR' (this will throw an Error in a future version of PHP) in wp-content/plugins/codeswholesale-for-woocommerce/vendor/guzzlehttp/guzzle/build/Burgomaster.php on line 115
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% 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: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8 in codeswholesale-for-woocommerce/assets to your readme.txt
- Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
codeswholesale-for-woocommerce/codeswholesale.php 85% from 13 tests
"CodesWholesale.com for WooCommerce" version 2.6.6'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:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("codeswholesale-for-woocommerce.php" instead of "codeswholesale.php")
- Git Repository: An alternative Git repository was detected
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 plugin38,951 lines of code in 471 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 411 | 6,554 | 10,484 | 31,972 |
Markdown | 17 | 1,138 | 0 | 3,739 |
reStructuredText | 8 | 845 | 1,053 | 1,114 |
JSON | 11 | 0 | 0 | 828 |
CSS | 2 | 98 | 0 | 518 |
make | 4 | 47 | 5 | 202 |
JavaScript | 1 | 18 | 60 | 172 |
YAML | 7 | 35 | 1 | 150 |
XML | 6 | 12 | 1 | 105 |
SVG | 1 | 0 | 1 | 97 |
Python | 1 | 18 | 22 | 28 |
SQL | 1 | 3 | 2 | 16 |
Dockerfile | 1 | 8 | 0 | 10 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 6.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 88.00 |
Average method complexity | 1.75 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 27.00 |
Code structure | ||
---|---|---|
Namespaces | 53 | |
Interfaces | 41 | |
Traits | 2 | |
Classes | 331 | |
▷ Abstract classes | 12 | 3.63% |
▷ Concrete classes | 319 | 96.37% |
▷ Final classes | 16 | 5.02% |
Methods | 2,644 | |
▷ Static methods | 181 | 6.85% |
▷ Public methods | 2,348 | 88.80% |
▷ Protected methods | 77 | 2.91% |
▷ Private methods | 219 | 8.28% |
Functions | 510 | |
▷ Named functions | 73 | 14.31% |
▷ Anonymous functions | 437 | 85.69% |
Constants | 361 | |
▷ Global constants | 2 | 0.55% |
▷ Class constants | 359 | 99.45% |
▷ Public constants | 359 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.24MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/codeswholesale/cw-extension-framework/src/Assets/img/codeswholesale.png | 2.78KB | 2.09KB | ▼ 24.83% |
vendor/guzzlehttp/guzzle/docs/_static/guzzle-icon.png | 0.78KB | 0.94KB | 0.00% |
vendor/guzzlehttp/guzzle/docs/_static/logo.png | 241.87KB | 69.68KB | ▼ 71.19% |
vendor/codeswholesale/cw-extension-framework/src/Assets/img/codeswholesale-icon.png | 0.14KB | 0.14KB | ▼ 0.68% |