77% woowbot-woocommerce-chatbot

Code Review | ChatBot for Woocommerce

WordPress plugin ChatBot for Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: woowbot-woocommer...
  • Plugin version: 3.5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Jul 12, 2017
  • Latest release: Nov 24, 2023
  • Number of updates: 91
  • Update frequency: every 25.6 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

700+ active /45,426 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.80ms] Passed 4 tests

Server-side resources used by ChatBot for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.61 ▲1.46
Dashboard /wp-admin3.32 ▲0.0145.83 ▼3.32
Posts /wp-admin/edit.php3.37 ▲0.0150.53 ▲0.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.60 ▼1.79
Media Library /wp-admin/upload.php3.24 ▲0.0134.61 ▼2.23
Support /wp-admin/admin.php?page=qcpro-promo-page-woowbot-support3.0124.37
Help /wp-admin/admin.php?page=qcld_woowbot_info_page3.0124.91

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 215 new files
Database: no new tables, 39 new options
New WordPress options
widget_theysaidso_widget
qlcd_woo_chatbot_agent
woo_chatbot_position_x
qlcd_woo_chatbot_send_a_msg
qlcd_woo_chatbot_send_us_email
qlcd_woo_chatbot_provide_email_address
qlcd_woo_chatbot_product_asking
widget_recent-comments
qlcd_woo_chatbot_name_greeting
woo_chatbot_position_y
...

Browser metrics Passed 4 tests

An overview of browser requirements for ChatBot for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3414.71 ▼0.001.68 ▼0.1446.02 ▲6.45
Dashboard /wp-admin2,195 ▲175.61 ▼0.1686.21 ▼26.3237.47 ▼10.82
Posts /wp-admin/edit.php2,097 ▼31.96 ▲0.0238.15 ▼4.0736.29 ▼0.40
Add New Post /wp-admin/post-new.php1,530 ▲423.22 ▼0.30639.08 ▼54.7953.37 ▼5.58
Media Library /wp-admin/upload.php1,403 ▲94.22 ▲0.0395.11 ▼0.5641.10 ▼1.35
Support /wp-admin/admin.php?page=qcpro-promo-page-woowbot-support280.410.074.13
Help /wp-admin/admin.php?page=qcld_woowbot_info_page280.410.064.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 39 options
    • qlcd_woo_chatbot_send_a_msg
    • qlcd_woo_chatbot_product_search
    • qlcd_wp_chatbot_admin_email_name
    • qlcd_woo_chatbot_email_successfully
    • disable_woo_chatbot_on_mobile
    • qlcd_woo_chatbot_catalog
    • qlcd_wp_chatbot_admin_from_email
    • qlcd_woo_chatbot_agent_join
    • qlcd_woo_chatbot_send_us_email
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woowbot-woocommerce-chatbot/class-qc-free-plugin-upgrade-notice.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woowbot-woocommerce-chatbot/qc-support-promo-page/class-qc-support-promo-page.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woowbot-woocommerce-chatbot/qcld-woowbot-info-page.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=qcpro-promo-page-woowbot-support
    • > Network (severe)
    wp-admin/admin.php?page=qcpro-promo-page-woowbot-support - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=qcld_woowbot_info_page
    • > Network (severe)
    wp-admin/admin.php?page=qcld_woowbot_info_page - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: woocommerce, bot, chatbot, live chat, woocommerce chatbot...

woowbot-woocommerce-chatbot/qcld-woowbot.php 77% from 13 tests

"ChatBot for Woocommerce" version 3.5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woowbot-woocommerce-chatbot.php" instead of "qcld-woowbot.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "4.9")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected10,154 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP86212933,153
SVG3102,972
CSS102891652,842
JavaScript93922371,049
PO File15758138

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity38.40
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity5.79
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3897.44%
▷ Protected methods00.00%
▷ Private methods12.56%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
112 PNG files occupy 2.40MB with 1.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
qc-support-promo-page/images/icon-pack/service-05.png2.20KB1.44KB▼ 34.37%
qc-support-promo-page/images/feature01.png6.14KB2.76KB▼ 55.04%
images/plugin-images/jarvis-icon-256x256.png27.24KB10.04KB▼ 63.15%
qc-support-promo-page/images/slider-hero-icon-256x256.png71.55KB20.25KB▼ 71.70%
qc-support-promo-page/images/icon-pack/service-01.png2.46KB1.72KB▼ 30.01%