84% collectchat

Code Review | Chatbot for Website ⚡️

WordPress plugin Chatbot for Website ⚡️ scored 84% from 53 tests.

About plugin

  • Plugin page: collectchat
  • Plugin version: 2.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Sep 27, 2017
  • Latest release: Sep 16, 2021
  • Number of updates: 61
  • Update frequency: every 23.8 days
  • Top authors: collectchat (100%)

Code review

53 tests

User reviews

26 reviews

Install metrics

8,000+ active / 90,411 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼330.07ms] Passed 4 tests

Server-side resources used by Chatbot for Website ⚡️
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.0934.29 ▲0.08
Dashboard /wp-admin3.16 ▲0.1141.77 ▲5.02
Posts /wp-admin/edit.php3.22 ▲0.1145.24 ▲5.99
Add New Post /wp-admin/post-new.php5.53 ▲0.1090.17 ▼1,322.36
Media Library /wp-admin/upload.php3.11 ▲0.1033.96 ▼3.00

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
collectchat-plugin-settings

Browser metrics Passed 4 tests

Checking browser requirements for Chatbot for Website ⚡️
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲17915.93 ▲0.027.10 ▼2.2644.92 ▼7.73
Dashboard /wp-admin3,043 ▲1945.95 ▲0.06135.70 ▲4.06124.97 ▲22.30
Posts /wp-admin/edit.php2,800 ▲942.70 ▲0.0162.28 ▼10.4090.48 ▲3.07
Add New Post /wp-admin/post-new.php1,936 ▲8319.02 ▼0.16365.39 ▼10.38164.32 ▲50.59
Media Library /wp-admin/upload.php1,813 ▲355.02 ▼0.01126.41 ▼15.70138.31 ▲20.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • collectchat-plugin-settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/collectchat/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/collectchat/meta.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/collectchat/options.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: chat bot, chatbot, lead generation, bot, chat widget

collectchat/collect.php 85% from 13 tests

"Chatbot for Website ⚡️" version 2.2.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 190 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("collectchat.php" instead of "collect.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
Good job! No executable or dangerous file extensions detected777 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP616664664
CSS110113

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected