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
- Install procedure validation failed for this plugin
- > Notice in wp-content/plugins/createweb-ajax-cart/cw-shopping-cart.php+244
Trying to access array offset on value of type bool
Server metrics [RAM: ▼1.82MB] [CPU: ▼185.93ms] Passed 4 tests
A check of server-side resources used by CW Ajax Cart
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.81 ▼0.91 | 5.04 ▼19.65 |
Dashboard /wp-admin | 1.83 ▼1.22 | 4.97 ▼38.50 |
Posts /wp-admin/edit.php | 1.83 ▼1.28 | 5.99 ▼38.28 |
Add New Post /wp-admin/post-new.php | 1.83 ▼3.60 | 5.47 ▼640.82 |
Media Library /wp-admin/upload.php | 1.83 ▼1.17 | 5.39 ▼26.11 |
Orders /wp-admin/admin.php?page=manage-cw-cart-order | 1.83 | 5.18 |
Coupons /wp-admin/edit.php?post_type=cw_coupon | 1.83 | 6.02 |
CW Ajax Cart /wp-admin/admin.php?page=manage-ajax-cart | 1.83 | 5.63 |
Server storage [IO: ▲0.98MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 50 new files
Database: 1 new table, 4 new options
New tables |
---|
cw_cart_order |
New WordPress options |
---|
widget_cw_minicart_widget |
cw_cart |
cw_cart_settings |
cw_cart_options |
Browser metrics Passed 4 tests
CW Ajax Cart: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,884 ▲288 | 16.53 ▲0.82 | 23.01 ▲12.84 | 53.27 ▲8.24 |
Dashboard /wp-admin | 3,013 ▲79 | 5.98 ▲0.00 | 151.50 ▲1.02 | 107.37 ▼5.01 |
Posts /wp-admin/edit.php | 2,782 ▲43 | 2.73 ▲0.02 | 72.94 ▲7.03 | 88.02 ▼1.57 |
Add New Post /wp-admin/post-new.php | 1,644 ▲29 | 21.44 ▲0.09 | 293.42 ▲8.65 | 104.38 ▼3.56 |
Media Library /wp-admin/upload.php | 1,850 ▲43 | 5.07 ▲0.04 | 153.48 ▼18.13 | 106.89 ▼5.50 |
Orders /wp-admin/admin.php?page=manage-cw-cart-order | 1,102 | 2.33 | 60.57 | 59.00 |
Coupons /wp-admin/edit.php?post_type=cw_coupon | 1,439 | 2.63 | 65.18 | 76.57 |
CW Ajax Cart /wp-admin/admin.php?page=manage-ajax-cart | 1,454 | 2.36 | 59.00 | 82.17 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/createweb-ajax-cart/cw-shopping-cart.php+247
Undefined index: cart_post_type
- This plugin does not fully uninstall, leaving 1 option in the database
- widget_cw_minicart_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
- 5 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=manage-ajax-cart
- > Notice in wp-content/plugins/createweb-ajax-cart/includes/settings.php+234
Undefined index: cart_post_type
- > GET request to /wp-admin/admin.php?page=manage-ajax-cart
- > Notice in wp-content/plugins/createweb-ajax-cart/includes/settings.php+200
Undefined index: cart_page
- > GET request to /wp-admin/admin.php?page=manage-ajax-cart
- > Notice in wp-content/plugins/createweb-ajax-cart/includes/settings.php+270
Undefined index: cart_link_text
- > GET request to /wp-admin/admin.php?page=manage-ajax-cart
- > Notice in wp-content/plugins/createweb-ajax-cart/includes/settings.php+356
Undefined index: cart_added_msg
- > GET request to /wp-admin/admin.php?page=manage-ajax-cart
- > Notice in wp-content/plugins/createweb-ajax-cart/includes/settings.php+460
Undefined index: cart_order_msg_success
- > GET request to /wp-admin/admin.php?page=manage-ajax-cart
- > Notice in wp-content/plugins/createweb-ajax-cart/includes/settings.php+475
Undefined index: cart_redirect_page
SRP 50% 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 items
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/createweb-ajax-cart/includes/settings.php:190
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/createweb-ajax-cart/includes/shortcodes.php:45
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/createweb-ajax-cart/includes/widget.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/createweb-ajax-cart/includes/shortcodes.php:45
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: shop cart, ajax cart, e-commerce, shop, cart...
createweb-ajax-cart/cw-shopping-cart.php 92% from 13 tests
The principal PHP file in "CW Ajax Cart" v. 2.1 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("createweb-ajax-cart.php" instead of "cw-shopping-cart.php")
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 plugin3,836 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 494 | 183 | 1,587 |
JavaScript | 7 | 386 | 186 | 1,313 |
CSS | 3 | 57 | 21 | 747 |
PO File | 1 | 81 | 90 | 189 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 14.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 25.00 |
Average method complexity | 5.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 51 | |
▷ Named functions | 51 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
21 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
libs/fancybox/fancy_shadow_sw.png | 0.33KB | 0.48KB | 0.00% |
libs/fancybox/fancy_shadow_ne.png | 0.34KB | 0.48KB | 0.00% |
libs/fancybox/fancy_title_main.png | 0.09KB | 0.14KB | 0.00% |
libs/fancybox/fancy_close.png | 1.48KB | 1.73KB | 0.00% |
libs/fancybox/fancy_title_left.png | 0.49KB | 0.82KB | 0.00% |