73% chatbot

Code Review | AI ChatBot

WordPress plugin AI ChatBot scored73%from 54 tests.

About plugin

  • Plugin page: chatbot
  • Plugin version: 5.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Aug 30, 2018
  • Latest release: Nov 28, 2023
  • Number of updates: 249
  • Update frequency: every 7.7 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

96 reviews

Install metrics

5,000+ active /322,949 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.70MB] [CPU: ▲7.65ms] 75% from 4 tests

An overview of server-side resources used by AI ChatBot
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 539.12ms on /wp-admin/admin.php?page=wpbot)
PageMemory (MB)CPU Time (ms)
Home /5.21 ▲1.7555.05 ▲10.13
Dashboard /wp-admin5.01 ▲1.6655.72 ▼5.40
Posts /wp-admin/edit.php5.06 ▲1.7059.08 ▲9.94
Add New Post /wp-admin/post-new.php7.60 ▲1.71112.40 ▲24.89
Media Library /wp-admin/upload.php4.93 ▲1.7046.70 ▲15.94
Help and Debugging /wp-admin/admin.php?page=wpbot_help_page4.9353.10
OpenAI Settings /wp-admin/admin.php?page=wpbot_openAi5.2550.33
Settings /wp-admin/admin.php?page=wpbot6.38539.12
Simple Text Responses /wp-admin/admin.php?page=simple-text-response4.9041.26
Support /wp-admin/admin.php?page=wpbot_support_page4.8439.47
WPBot Lite /wp-admin/admin.php?page=wpbot-panel5.0746.97

Server storage [IO: ▲8.63MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 263 new files
Database: 3 new tables, 201 new options
New tables
wp_wpbot_response
wp_wpwbot_index
wp_wpbot_sessions
New WordPress options
qlcd_wp_chatbot_meta_label
qlcd_wp_chatbot_cart_link
enable_wp_chatbot_inactive_time_show
qlcd_wp_chatbot_fb_app_id
qlcd_wp_chatbot_host
qlcd_wp_chatbot_cart_removing
qlcd_wp_chatbot_product_order
wp_chatbot_agent_image
qlcd_wp_chatbot_viewed_product_welcome
qlcd_wp_chatbot_email_sent
...

Browser metrics Passed 4 tests

Checking browser requirements for AI ChatBot
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,112 ▲36513.70 ▼0.8914.81 ▲13.1933.03 ▼7.50
Dashboard /wp-admin2,248 ▲705.64 ▼0.0494.88 ▼16.3944.40 ▲1.74
Posts /wp-admin/edit.php2,147 ▲442.03 ▲0.0839.57 ▼0.3538.57 ▲5.96
Add New Post /wp-admin/post-new.php1,567 ▲4123.16 ▼0.05704.26 ▼11.7652.06 ▼8.34
Media Library /wp-admin/upload.php1,453 ▲624.20 ▼0.0495.57 ▼4.4746.09 ▲3.79
Help and Debugging /wp-admin/admin.php?page=wpbot_help_page1,8923.7956.62101.89
OpenAI Settings /wp-admin/admin.php?page=wpbot_openAi1,9263.6957.9892.65
Settings /wp-admin/admin.php?page=wpbot15,0428.07404.59127.30
Simple Text Responses /wp-admin/admin.php?page=simple-text-response1,2441.7231.7233.85
Support /wp-admin/admin.php?page=wpbot_support_page1,9091.7024.5781.00
WPBot Lite /wp-admin/admin.php?page=wpbot-panel1,5813.7446.5695.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_wpbot_response
    • wp_wpbot_sessions
    • wp_wpwbot_index
  • This plugin does not fully uninstall, leaving 201 options in the database
    • qlcd_wp_chatbot_support_phone
    • wp_chatbot_show_wpcommerce
    • qcld_wb_chatbot_theme
    • qlcd_wp_chatbot_thank_for_phone
    • wp_chatbot_exit_intent_msg
    • qlcd_wp_chatbot_cart_link
    • qlcd_wp_chatbot_did_you_mean
    • disable_wp_chatbot_faq
    • qlcd_wp_chatbot_no_result
    • wp_chatbot_exclude_post_list
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 36× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/chatbot/templates/template-01/template.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/chatbot/templates/app-templates/app-order-thankyou.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/chatbot/includes/openai/admin/admin_ui2.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/chatbot/includes/openai/admin/data_post_converter.php:89
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/chatbot/includes/openai/qcld_wp_OpenAI.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatbot/includes/openai/plugin-upgrader/admin/admin-notices.php:4
    • > PHP Warning
      Use of undefined constant QCLD_wpCHATBOT_IMG_URL - assumed 'QCLD_wpCHATBOT_IMG_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/chatbot/qc-rating-feature/qc-rating-class.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/chatbot/templates/template-horizontal/template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/chatbot/templates/template-horizontal/shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/chatbot/templates/template-02/shortcode.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Screenshots: Please a description for screenshot #4 in chatbot/assets to your readme.txt
You can look at the official readme.txt

chatbot/qcld-wpwbot.php 77% from 13 tests

The main PHP file in "AI ChatBot" ver. 5.0.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/lang")
  • Main file name: Name the main plugin file the same as the plugin slug ("chatbot.php" instead of "qcld-wpwbot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin32,195 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
PHP491,37596212,714
CSS252,0783917,366
JavaScript181,4138246,955
SVG2002,959
PO File26106271,290
HTML11210501
XML300410

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity34.47
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity84.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods146
▷ Static methods85.48%
▷ Public methods13089.04%
▷ Protected methods00.00%
▷ Private methods1610.96%
Functions100
▷ Named functions100100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
93 PNG files occupy 2.41MB with 1.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
qc-support-promo-page/images/coming-soon-special.png44.70KB15.55KB▼ 65.22%
images/wp-boat-product-close-icon.png1.33KB0.29KB▼ 78.02%
images/conversational-forns.png10.65KB5.76KB▼ 45.89%
images/chatbot.png37.72KB10.93KB▼ 71.01%
qc-support-promo-page/images/premium-theme-coming-soont.png42.28KB15.04KB▼ 64.44%