66% cart66-cloud

Code Review | Cart66 Cloud :: WordPress Ecommerce The Easy Way

WordPress plugin Cart66 Cloud :: WordPress Ecommerce The Easy Way scored66%from 54 tests.

About plugin

  • Plugin page: cart66-cloud
  • Plugin version: 2.3.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2013
  • Latest release: Sep 4, 2019
  • Number of updates: 131
  • Update frequency: every 17.2 days
  • Top authors: reality66 (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

200+ active /36,607 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.64MB] [CPU: ▲7.37ms] 75% from 4 tests

This is a short check of server-side resources used by Cart66 Cloud :: WordPress Ecommerce The Easy Way
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 579.71ms on /wp-admin/post-new.php?post_type=cc_product)
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.5944.64 ▼0.19
Dashboard /wp-admin4.07 ▲0.7654.70 ▲2.37
Posts /wp-admin/edit.php4.12 ▲0.7663.22 ▲13.87
Add New Post /wp-admin/post-new.php6.35 ▲0.46653.06 ▲557.66
Media Library /wp-admin/upload.php3.99 ▲0.7646.86 ▲13.44
All Products /wp-admin/edit.php?post_type=cc_product4.0443.99
All Reviews /wp-admin/edit.php?post_type=cc_customer_review4.0440.60
Add New /wp-admin/post-new.php?post_type=cc_customer_review4.23688.43
Secure Console /wp-admin/admin.php?page=cart66_secure_console3.9743.58
Cart66 Cloud /wp-admin/admin.php?page=cart663.9741.36
Product Categories /wp-admin/edit-tags.php?taxonomy=product-category&post_type=cc_product3.9944.52
Add New /wp-admin/post-new.php?post_type=cc_product4.24579.71

Server storage [IO: ▲0.98MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 127 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_cc_cart_widget
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Cart66 Cloud :: WordPress Ecommerce The Easy Way
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲25713.79 ▼0.514.97 ▲3.1136.75 ▼4.90
Dashboard /wp-admin2,315 ▲1245.06 ▼0.84116.23 ▲12.2444.34 ▲3.84
Posts /wp-admin/edit.php2,198 ▲1092.36 ▲0.3741.64 ▲2.2236.09 ▼4.62
Add New Post /wp-admin/post-new.php1,880 ▲34323.50 ▲5.32663.99 ▲41.2249.52 ▼0.40
Media Library /wp-admin/upload.php1,497 ▲1064.46 ▲0.2697.11 ▼2.5042.61 ▼0.67
All Products /wp-admin/edit.php?post_type=cc_product1,2022.4433.6529.25
All Reviews /wp-admin/edit.php?post_type=cc_customer_review1,1762.4538.3631.51
Add New /wp-admin/post-new.php?post_type=cc_customer_review2,6707.96181.1164.25
Secure Console /wp-admin/admin.php?page=cart66_secure_console1,2253.4451.8854.28
Cart66 Cloud /wp-admin/admin.php?page=cart661,1952.0226.2633.29
Product Categories /wp-admin/edit-tags.php?taxonomy=product-category&post_type=cc_product1,3712.1130.1630.45
Add New /wp-admin/post-new.php?post_type=cc_product3,1837.81176.8060.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_cc_cart_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=cc_product
    • > Warning in wp-content/plugins/cart66-cloud/views/html-review-pop-up.php+42
    Invalid argument supplied for foreach()

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 take a closer look at the following
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cart66-cloud/views/admin/html-image-meta-box.php
    • > /wp-content/plugins/cart66-cloud/views/widget/html-category-sidebar.php
    • > /wp-content/plugins/cart66-cloud/views/admin/html-system-info.php
    • > /wp-content/plugins/cart66-cloud/views/admin/html-secure-console.php
    • > /wp-content/plugins/cart66-cloud/views/widget/cart-sidebar.php
  • 74× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CC_Admin_Setting' not found in wp-content/plugins/cart66-cloud/includes/admin/class-cc-admin-post-type-settings.php:3
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/cart66-cloud/includes/class-cc-shortcode-manager.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/cart66-cloud/templates/partials/grid-item.php:4
    • > PHP Notice
      Undefined variable: after_widget in wp-content/plugins/cart66-cloud/views/widget/html-category-sidebar.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cart66-cloud/views/html-review-pop-up.php:7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cart66-cloud/includes/class-cc-shortcode-manager.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/cart66-cloud/includes/admin/cc-image-meta-box.php:3
    • > PHP Notice
      Undefined variable: sku in wp-content/plugins/cart66-cloud/views/product-review-form.php on line 4
    • > PHP Notice
      Undefined variable: after_widget in wp-content/plugins/cart66-cloud/views/widget/cart-sidebar.php on line 10
    • > PHP Notice
      Undefined variable: review in wp-content/plugins/cart66-cloud/views/product-review.php on line 9

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=product-category&post_type=cc_product
    • > Console-api (severe) in wp-content/plugins/cart66-cloud/resources/js/choices.min.js?ver=6.3.1+1199:22
    Could not find passed element or passed element was of an invalid type
    • > GET request to /wp-admin/admin.php?page=cart66_secure_console
    • > Security (severe) in unknown
    https://manage.cart66.com/users/sign_in 64 Blocked autofocusing on a element in a cross-origin subframe.
    • > GET request to /wp-admin/admin.php?page=cart66_secure_console
    • > Network (severe)
    https://d36ee2fcip1434.cloudfront.net/track.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Cart66 product catalog showing featured products), #2 (Cart66 product image gallery with zoom), #3 (Products: No matter what type of products you want to sell, we've got you covered. No extra paid extensions or add-ons needed.), #4 (Product details: unlimited variations, attach files, set custom text for receipts and much more...), #5 (Digital products: Upload and attach one or more files to a product. We'll securely store and deliver your files too!), #6 (Live carts: Watch people shop in real-time), #7 (Subscription management: Get a quick look at which memberships and subscriptions are expiring or past due. Edit orders, resend email receipts and more!), #8 (Customer communication: Drip content, send follow up emails, send special coupons after buying specific products all with beautiful HTML emails!), #9 (Customer portal: Allow your customers to sign in and see their order history, manage their subscriptions and update their saved credit cards.)
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

cart66-cloud/cart66-cloud.php Passed 13 tests

The main PHP file in "Cart66 Cloud :: WordPress Ecommerce The Easy Way" ver. 2.3.7 adds more information about the plugin and also serves as the entry point for this plugin
29 characters long description:
Ecommerce Without The Clutter

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin9,326 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PHP921,3581,3985,330
JavaScript9652,0663,462
CSS79554534

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.47
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes58
▷ Abstract classes00.00%
▷ Concrete classes58100.00%
▷ Final classes11.72%
Methods280
▷ Static methods9835.00%
▷ Public methods27397.50%
▷ Protected methods20.71%
▷ Private methods51.79%
Functions78
▷ Named functions6988.46%
▷ Anonymous functions911.54%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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.47MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/cart-icon-light.png1.02KB1.28KB0.00%
resources/images/chosen-sprite.png0.63KB0.88KB0.00%
resources/images/icon.png0.27KB0.44KB0.00%
screenshot-3.png18.61KB17.39KB▼ 6.53%
resources/images/select2x2.png1.77KB0.52KB▼ 70.81%