56% knowledgebase-helpdesk

Code Review | KnowledgeBase Documentation with HelpDesk and AI ChatBot

WordPress plugin KnowledgeBase Documentation with HelpDesk and AI ChatBot scored56%from 54 tests.

About plugin

  • Plugin page: knowledgebase-hel...
  • Plugin version: 3.4.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Apr 19, 2017
  • Latest release: Nov 24, 2023
  • Number of updates: 67
  • Update frequency: every 36.1 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

60+ active /13,210 total downloads

Benchmarks

Plugin footprint 65% 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: ▲2.96MB] [CPU: ▲25.09ms] 75% from 4 tests

A check of server-side resources used by KnowledgeBase Documentation with HelpDesk and AI ChatBot
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 514.55ms on /wp-admin/admin.php?page=wpbot)
PageMemory (MB)CPU Time (ms)
Home /6.31 ▲2.8573.58 ▲25.46
Dashboard /wp-admin6.30 ▲3.0069.32 ▲16.14
Posts /wp-admin/edit.php6.37 ▲3.0177.54 ▲31.20
Add New Post /wp-admin/post-new.php9.06 ▲3.18119.17 ▲27.55
Media Library /wp-admin/upload.php6.21 ▲2.9865.10 ▲31.30
Settings /wp-admin/edit.php?post_type=kbx_knowledgebase&page=kbx-settings6.2159.84
All Articles /wp-admin/edit.php?post_type=kbx_knowledgebase6.3161.10
OpenAI Settings /wp-admin/admin.php?page=wpbot_openAi6.2762.10
Settings /wp-admin/admin.php?page=wpbot6.95514.55
Help and Debugging /wp-admin/admin.php?page=wpbot_help_page6.2260.87
Help /wp-admin/edit.php?post_type=kbx_knowledgebase&page=kbx-help-kbhd-page6.2157.04
Simple Text Responses /wp-admin/admin.php?page=simple-text-response6.2659.04
Sections /wp-admin/edit-tags.php?taxonomy=kbx_category&post_type=kbx_knowledgebase6.3969.45
Tags /wp-admin/edit-tags.php?taxonomy=kbx_tag&post_type=kbx_knowledgebase6.3557.31
Add New Article /wp-admin/post-new.php?post_type=kbx_knowledgebase9.06109.55

Server storage [IO: ▲22.29MB] [DB: ▲0.10MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 587 new files
Database: 3 new tables, 205 new options
New tables
wp_wpbot_response
wp_wpwbot_index
wp_wpbot_sessions
New WordPress options
disable_wp_chatbot_feedback
disable_wp_chatbot_order_status
qlcd_wp_chatbot_hi_there
wp_chatbot_exit_intent_once
enable_wp_chatbot_floating_link
qlcd_wp_chatbot_agent_join
qc_wpbot_rating_active_time
qlcd_wp_chatbot_load_more
qlcd_wp_chatbot_notifications
enable_wp_chatbot_messenger
...

Browser metrics Passed 4 tests

A check of browser resources used by KnowledgeBase Documentation with HelpDesk and AI ChatBot
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,371 ▲60915.24 ▲0.9016.38 ▲14.5727.91 ▼15.67
Dashboard /wp-admin2,443 ▲2636.34 ▲0.68120.54 ▲26.9975.62 ▲33.69
Posts /wp-admin/edit.php2,405 ▲3083.47 ▲1.4952.27 ▲14.2476.81 ▲40.02
Add New Post /wp-admin/post-new.php1,678 ▲15023.09 ▼0.00683.46 ▲3.7944.03 ▼9.00
Media Library /wp-admin/upload.php1,520 ▲1204.20 ▲0.0681.77 ▼12.3571.21 ▲29.33
Settings /wp-admin/edit.php?post_type=kbx_knowledgebase&page=kbx-settings1,4843.5149.0076.07
All Articles /wp-admin/edit.php?post_type=kbx_knowledgebase1,5083.8660.1473.04
OpenAI Settings /wp-admin/admin.php?page=wpbot_openAi1,8063.8174.59115.17
Settings /wp-admin/admin.php?page=wpbot7,79610.38316.03136.38
Help and Debugging /wp-admin/admin.php?page=wpbot_help_page1,6903.8555.4286.66
Help /wp-admin/edit.php?post_type=kbx_knowledgebase&page=kbx-help-kbhd-page1,3083.3645.3164.35
Simple Text Responses /wp-admin/admin.php?page=simple-text-response1,5433.3746.1569.73
Sections /wp-admin/edit-tags.php?taxonomy=kbx_category&post_type=kbx_knowledgebase1,6833.4544.3171.68
Tags /wp-admin/edit-tags.php?taxonomy=kbx_tag&post_type=kbx_knowledgebase1,5293.2647.2867.71
Add New Article /wp-admin/post-new.php?post_type=kbx_knowledgebase6,41520.20826.74166.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_wpbot_sessions
    • wp_wpbot_response
    • wp_wpwbot_index
  • This plugin did not uninstall successfully, leaving 205 options in the database
    • qlcd_wp_chatbot_wildcard_support
    • qlcd_wp_chatbot_wildcard_order
    • qlcd_wp_chatbot_invalid_email
    • qlcd_wp_chatbot_cart_updating
    • disable_wp_chatbot_catalog
    • qlcd_wp_chatbot_sale_products
    • disable_wp_chatbot_site_search
    • qlcd_wp_chatbot_viewed_product_welcome
    • qlcd_wp_chatbot_agent
    • wp_chatbot_scroll_percent
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=kbx_knowledgebase
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-admin/includes/plugin.php+1784
    Invalid argument supplied for foreach()

SRP 0% 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
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/knowledgebase-helpdesk/kbx-wpbot/extended-search-addon/libs/vendor/phpspec/php-diff/example/example.php
    • > /wp-content/plugins/knowledgebase-helpdesk/views/templates/basic/template.php
    • > /wp-content/plugins/knowledgebase-helpdesk/kbx-wpbot/extended-search-addon/wpbot-posttype-search-addon.php
    • > /wp-content/plugins/knowledgebase-helpdesk/kbx-main-file.php
  • 113× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knowledgebase-helpdesk/admin/category/kbx_category_image.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/knowledgebase-helpdesk/views/bot-templates/template-03/template.php:5
    • > PHP Warning
      require_once(wp-content/plugins/knowledgebase-helpdesk/kbx-wpbot/extended-search-addon/libs/vendor/loilo/fuse/test/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/knowledgebase-helpdesk/kbx-wpbot/extended-search-addon/libs/vendor/loilo/fuse/test/OptionsTest.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/knowledgebase-helpdesk/kbx-wpbot/extended-search-addon/libs/vendor/loilo/fuse/test/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/knowledgebase-helpdesk/kbx-wpbot/extended-search-addon/libs/vendor/loilo/fuse/test/UseIdTest.php on line 2
    • > PHP Notice
      Undefined variable: show_search_form in wp-content/plugins/knowledgebase-helpdesk/views/templates/basic/kbx-faq.php on line 2
    • > PHP Warning
      require_once(wp-content/plugins/knowledgebase-helpdesk/kbx-wpbot/extended-search-addon/libs/vendor/loilo/fuse/test/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/knowledgebase-helpdesk/kbx-wpbot/extended-search-addon/libs/vendor/loilo/fuse/test/LongPatternTest.php on line 2
    • > PHP Notice
      Undefined variable: show_search_form in wp-content/plugins/knowledgebase-helpdesk/views/templates/basic/template.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/knowledgebase-helpdesk/kbx-wpbot/chatbot/qcld-openai-bot.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/knowledgebase-helpdesk/views/bot-templates/template-02/shortcode.php:8
    • > PHP Notice
      Undefined variable: show_search_form in wp-content/plugins/knowledgebase-helpdesk/views/templates/basic/template-glossary.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wpbot
    • > Network (severe)
    wp-content/plugins/chatbot/css/common-style.css?ver=3.8.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wpbot
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).fontpicker is not a function" "TypeError: $(...).fontpicker is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=wpbot:1140:58)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=wpbot
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught TypeError: $(...).fontpicker is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: documentation, docs, knowledgebase, helpdesk, chatbot

knowledgebase-helpdesk/kbx-main-file.php 77% from 13 tests

The main PHP script in "KnowledgeBase Documentation with HelpDesk and AI ChatBot" version 3.4.5 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("knowledgebase-helpdesk.php" instead of "kbx-main-file.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "4.7")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected71,122 lines of code in 274 files:
LanguageFilesBlank linesComment linesLines of code
PHP1513,7293,44521,515
JavaScript403,9851,95615,755
CSS533,34188915,575
JSON8307,396
SVG5015,924
PO File51,5701,7193,569
HTML224201,002
Markdown31290279
YAML413769
Sass33138

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.05
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes63
▷ Abstract classes11.59%
▷ Concrete classes6298.41%
▷ Final classes11.61%
Methods390
▷ Static methods379.49%
▷ Public methods35190.00%
▷ Protected methods71.79%
▷ Private methods328.21%
Functions261
▷ Named functions24393.10%
▷ Anonymous functions186.90%
Constants36
▷ Global constants36100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
173 PNG files occupy 4.20MB with 2.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
kbx-wpbot/chatbot/images/woo-addon-256.png34.99KB11.57KB▼ 66.94%
qc-support-promo-page/images/premium-theme-chatbot-master.png50.54KB14.02KB▼ 72.27%
kbx-wpbot/chatbot/qc-support-promo-page/images/wpboticon-256x256-1.png37.72KB10.93KB▼ 71.01%
assets/images/user-01.png2.87KB1.73KB▼ 39.89%
assets/images/icon-2.png5.91KB3.10KB▼ 47.55%