84% collectchat

Code Review | Chatbot for WordPress ⚡️

WordPress plugin Chatbot for WordPress ⚡️ scored84%from 54 tests.

About plugin

  • Plugin page: collectchat
  • Plugin version: 2.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 27, 2017
  • Latest release: Oct 25, 2023
  • Number of updates: 72
  • Update frequency: every 30.8 days
  • Top authors: collectchat (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

8,000+ active /151,042 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.64ms] Passed 4 tests

An overview of server-side resources used by Chatbot for WordPress ⚡️
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.92 ▲4.05
Dashboard /wp-admin3.41 ▲0.0644.76 ▼11.39
Posts /wp-admin/edit.php3.53 ▲0.1748.29 ▲0.34
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.71 ▼13.20
Media Library /wp-admin/upload.php3.34 ▲0.1136.64 ▲1.71

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
collectchat-plugin-settings
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Chatbot for WordPress ⚡️
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11314.36 ▲0.011.98 ▲0.3043.21 ▲1.85
Dashboard /wp-admin2,258 ▲845.62 ▲0.0482.86 ▼4.1383.37 ▲41.44
Posts /wp-admin/edit.php2,161 ▲612.13 ▲0.1733.72 ▼7.6935.83 ▲3.58
Add New Post /wp-admin/post-new.php6,346 ▲4,81820.54 ▼2.60880.83 ▲222.10186.66 ▲126.04
Media Library /wp-admin/upload.php1,460 ▲574.14 ▼0.0098.06 ▲3.4974.18 ▲29.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • collectchat-plugin-settings
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > 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
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/collectchat/sidebar.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: chat widget, chat bot, chatbot, lead generation, bot

collectchat/collect.php 85% from 13 tests

Analyzing the main PHP file in "Chatbot for WordPress ⚡️" version 2.3.9
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("collectchat.php" instead of "collect.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 190 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected777 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP616664664
CSS110113

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
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 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin