Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▲0.43MB] [CPU: ▼2.93ms] Passed 4 tests
An overview of server-side resources used by J Cart Upsell and Cross-sell for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.90 ▲0.44 | 36.98 ▼4.52 |
Dashboard /wp-admin | 3.74 ▲0.40 | 49.66 ▼9.04 |
Posts /wp-admin/edit.php | 3.79 ▲0.44 | 51.79 ▲9.96 |
Add New Post /wp-admin/post-new.php | 6.42 ▲0.54 | 86.26 ▼4.96 |
Media Library /wp-admin/upload.php | 3.67 ▲0.43 | 37.71 ▲6.82 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 4.02 | 35.06 |
Server storage [IO: ▲4.58MB] [DB: ▲0.07MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 320 new files
Database: no new tables, 9 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
fs_active_plugins |
fs_debug_mode |
can_compress_scripts |
fs_accounts |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
J Cart Upsell and Cross-sell 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 / | 2,843 ▲96 | 14.05 ▼0.31 | 1.53 ▼0.12 | 27.74 ▼16.26 |
Dashboard /wp-admin | 2,251 ▲74 | 5.66 ▲0.04 | 86.44 ▲0.77 | 45.15 ▲6.03 |
Posts /wp-admin/edit.php | 2,153 ▲53 | 2.12 ▲0.17 | 37.56 ▲1.21 | 34.86 ▲5.08 |
Add New Post /wp-admin/post-new.php | 1,550 ▲21 | 22.96 ▼0.23 | 636.04 ▲17.74 | 61.25 ▲8.60 |
Media Library /wp-admin/upload.php | 1,447 ▲53 | 4.30 ▲0.12 | 95.24 ▼0.92 | 43.93 ▲2.71 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 1,101 | 1.65 | 22.71 | 26.48 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/wc-j-upsellator/freemius/includes/class-freemius.php+8546
Undefined property: stdClass::$plugins
- Zombie WordPress options detected upon uninstall: 9 options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- fs_active_plugins
- fs_accounts
- can_compress_scripts
- widget_recent-comments
- fs_debug_mode
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/wc-j-upsellator/templates/modal/footer.php
- > /wp-content/plugins/wc-j-upsellator/templates/modal/notices.php
- 34× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function woo_j_env() in wp-content/plugins/wc-j-upsellator/config/configuration.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function wc_get_price_decimals() in wp-content/plugins/wc-j-upsellator/views/wctimeline_total_placeholder.template.php:2
- > PHP Notice
Undefined variable: items in wp-content/plugins/wc-j-upsellator/templates/modal/footer.php on line 3
- > PHP Notice
Undefined variable: triggerable_gifts in wp-content/plugins/wc-j-upsellator/views/partials/wctimeline_items_list.template.php on line 146
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/wc-j-upsellator/views/partials/wctimeline_items_list.template.php on line 5
- > PHP Warning
count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/wc-j-upsellator/views/partials/wctimeline_items_list.template.php on line 146
- > PHP Notice
Undefined variable: upsells in wp-content/plugins/wc-j-upsellator/views/partials/wctimeline_items_list.template.php on line 158
- > PHP Fatal error
Uncaught Error: Call to a member function render() on null in wp-content/plugins/wc-j-upsellator/views/partials/wctimeline_items_list.template.php:158
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wc-j-upsellator/app/Shortcodes/DynamicBar.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wc-j-upsellator/app/Shortcodes/Upsells.php:5
- > 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 issues were found
Optimizations
Plugin configuration 93% 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
Attributes that require attention:
- Screenshots: Add descriptions for screenshots #5, #6, #7, #8, #9 in wc-j-upsellator/assets to your readme.txt
wc-j-upsellator/wc-j-upsellator.php 92% from 13 tests
The main PHP file in "J Cart Upsell and Cross-sell for WooCommerce" ver. 3.4.7 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin49,422 lines of code in 250 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 213 | 10,362 | 18,174 | 42,746 |
CSS | 17 | 555 | 69 | 3,699 |
JavaScript | 16 | 580 | 91 | 1,538 |
PO File | 1 | 475 | 712 | 1,282 |
SVG | 2 | 38 | 0 | 109 |
JSON | 1 | 1 | 0 | 48 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.58 |
Average class complexity | 47.85 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,096.00 |
Average method complexity | 4.24 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 1 | |
Traits | 7 | |
Classes | 99 | |
▷ Abstract classes | 3 | 3.03% |
▷ Concrete classes | 96 | 96.97% |
▷ Final classes | 1 | 1.04% |
Methods | 1,577 | |
▷ Static methods | 225 | 14.27% |
▷ Public methods | 1,087 | 68.93% |
▷ Protected methods | 49 | 3.11% |
▷ Private methods | 441 | 27.96% |
Functions | 135 | |
▷ Named functions | 127 | 94.07% |
▷ Anonymous functions | 8 | 5.93% |
Constants | 165 | |
▷ Global constants | 104 | 63.03% |
▷ Class constants | 61 | 36.97% |
▷ Public constants | 61 | 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
15 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/admin/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png | 5.68KB | 1.83KB | ▼ 67.77% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
assets/buy-me-a-coffee.png | 2.36KB | 2.38KB | 0.00% |
assets/admin/css/images/ui-icons_ffffff_256x240.png | 6.33KB | 4.18KB | ▼ 33.99% |
assets/admin/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png | 0.32KB | 0.18KB | ▼ 42.38% |