Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- Install procedure had errors
- > Notice in wp-content/plugins/ultracart-ecommerce-shopping-cart/uc-wp.php+17
Constant WP_DEBUG already defined
Server metrics [RAM: ▼1.79MB] [CPU: ▼59.21ms] Passed 4 tests
An overview of server-side resources used by UltraCart Ecommerce - Shopping Cart
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.20 ▼1.27 | 4.65 ▼45.02 |
Dashboard /wp-admin | 2.22 ▼1.09 | 5.47 ▼45.47 |
Posts /wp-admin/edit.php | 2.22 ▼1.14 | 10.30 ▼40.31 |
Add New Post /wp-admin/post-new.php | 2.22 ▼3.67 | 6.18 ▼106.04 |
Media Library /wp-admin/upload.php | 2.22 ▼1.02 | 5.70 ▼29.51 |
UltraCart /wp-admin/options-general.php?page=ucwp_plugin | 2.22 | 7.35 |
Server storage [IO: ▲10.96MB] [DB: ▲0.95MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 711 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_ucwp_items |
wp_ucwp_item_post_rel |
New WordPress options |
---|
ucwp_plugin_random |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by UltraCart Ecommerce - Shopping Cart
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,980 ▲245 | 13.94 ▼0.24 | 11.49 ▲9.86 | 49.16 ▲2.52 |
Dashboard /wp-admin | 2,233 ▲48 | 4.93 ▼0.92 | 110.00 ▼0.63 | 41.22 ▼5.76 |
Posts /wp-admin/edit.php | 2,115 ▲26 | 2.38 ▲0.34 | 45.31 ▲6.09 | 43.81 ▲9.46 |
Add New Post /wp-admin/post-new.php | 6,204 ▲4,684 | 19.21 ▼3.83 | 946.79 ▲306.79 | 35.24 ▼21.60 |
Media Library /wp-admin/upload.php | 1,408 ▲26 | 4.39 ▲0.14 | 105.50 ▼2.71 | 41.25 ▼2.85 |
UltraCart /wp-admin/options-general.php?page=ucwp_plugin | 823 | 1.89 | 30.87 | 33.67 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.95MB] 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 did not uninstall without warnings or errors
- > Notice in wp-content/plugins/ultracart-ecommerce-shopping-cart/uc-wp.php+17
Constant WP_DEBUG already defined
- This plugin does not fully uninstall, leaving 7 options in the database
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- ucwp_plugin_random
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=ucwp_plugin
- > Notice in wp-content/plugins/ultracart-ecommerce-shopping-cart/uc-wp.php+17
Constant WP_DEBUG already defined
- > GET request to /wp-admin/options-general.php?page=ucwp_plugin
- > User notice in wp-includes/functions.php+5905
Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the uc-wp-admin.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=ucwp_plugin
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the uc-wp-admin.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 13 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=ucwp_plugin
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+206
Trying to get property 'ID' of non-object
- > GET request to /wp-admin/options-general.php?page=ucwp_plugin
- > Notice in wp-content/plugins/ultracart-ecommerce-shopping-cart/settings.php+181
Undefined index: code
- > GET request to /wp-admin/options-general.php?page=ucwp_plugin
- > Notice in wp-content/plugins/ultracart-ecommerce-shopping-cart/settings.php+182
Undefined index: state
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=ucwp_plugin
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
Trying to get property 'post_title' of non-object
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=ucwp_plugin
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
Undefined offset: 0
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=ucwp_plugin
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
Trying to get property 'guid' of non-object
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/ultracart-ecommerce-shopping-cart/templates/ucwp_item_list.php
- > /wp-content/plugins/ultracart-ecommerce-shopping-cart/install.php
- 527× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'ultracart\\v2\\models\\ModelInterface' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/ultracart/rest_api_v2_sdk_php/lib/models/WebhookLog.php:42
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/guzzlehttp/psr7/src/BufferStream.php:14
- > PHP Fatal error
Uncaught Error: Interface 'ultracart\\v2\\models\\ModelInterface' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/ultracart/rest_api_v2_sdk_php/lib/models/CheckoutSetupBrowserKeyRequest.php:42
- > PHP Fatal error
Uncaught Error: Interface 'ultracart\\v2\\models\\ModelInterface' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/ultracart/rest_api_v2_sdk_php/lib/models/ExperimentVariation.php:42
- > PHP Fatal error
Uncaught Error: Interface 'ultracart\\v2\\models\\ModelInterface' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/ultracart/rest_api_v2_sdk_php/lib/models/OrderFraudScore.php:42
- > PHP Fatal error
Uncaught Error: Interface 'ultracart\\v2\\models\\ModelInterface' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/ultracart/rest_api_v2_sdk_php/lib/models/EmailClicksResponse.php:42
- > PHP Fatal error
Uncaught Error: Interface 'ultracart\\v2\\models\\ModelInterface' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/ultracart/rest_api_v2_sdk_php/lib/models/CouponAmountOffShipping.php:42
- > PHP Fatal error
Uncaught Error: Interface 'ultracart\\v2\\models\\ModelInterface' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/ultracart/rest_api_v2_sdk_php/lib/models/AccountsReceivableRetryStatRevenue.php:42
- > PHP Fatal error
Uncaught Error: Interface 'ultracart\\v2\\models\\ModelInterface' not found in wp-content/plugins/ultracart-ecommerce-shopping-cart/vendor/ultracart/rest_api_v2_sdk_php/lib/models/CartSettingsTerms.php:42
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
- Tags: Please delete some tags, you are using 12 tag instead of maximum 10
ultracart-ecommerce-shopping-cart/uc-wp.php 92% from 13 tests
This is the main PHP file of "UltraCart Ecommerce - Shopping Cart" version 1.42, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ultracart-ecommerce-shopping-cart.php" instead of "uc-wp.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected172,132 lines of code in 679 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 614 | 35,228 | 130,101 | 157,649 |
JavaScript | 20 | 1,037 | 1,453 | 6,013 |
Markdown | 15 | 1,103 | 0 | 4,131 |
JSON | 13 | 0 | 0 | 2,792 |
Sass | 9 | 206 | 52 | 1,016 |
CSS | 3 | 17 | 24 | 478 |
XML | 1 | 1 | 0 | 20 |
Dockerfile | 1 | 8 | 0 | 10 |
YAML | 1 | 0 | 0 | 10 |
make | 1 | 4 | 0 | 9 |
SVG | 1 | 0 | 0 | 4 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,952)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 26.21 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,952.00 |
Average method complexity | 1.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 81.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 16 | |
Traits | 2 | |
Classes | 554 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 554 | 100.00% |
▷ Final classes | 13 | 2.35% |
Methods | 14,829 | |
▷ Static methods | 2,478 | 16.71% |
▷ Public methods | 14,474 | 97.61% |
▷ Protected methods | 226 | 1.52% |
▷ Private methods | 129 | 0.87% |
Functions | 900 | |
▷ Named functions | 147 | 16.33% |
▷ Anonymous functions | 753 | 83.67% |
Constants | 801 | |
▷ Global constants | 50 | 6.24% |
▷ Class constants | 751 | 93.76% |
▷ Public constants | 751 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
20 PNG files occupy 1.27MB with 0.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/banner-772x250.png | 145.98KB | 62.94KB | ▼ 56.88% |
assets/screenshot-10.png | 5.05KB | 3.92KB | ▼ 22.39% |
assets/screenshot-4.png | 53.67KB | 39.58KB | ▼ 26.25% |
assets/screenshot-12.png | 13.15KB | 8.11KB | ▼ 38.31% |
assets/imgs/mce-icons/item.png | 1.05KB | 0.19KB | ▼ 82.33% |