90% chatbot-com-ai-platform

Code Review | ChatBot - WP chat bot plugin for WordPress

WordPress plugin ChatBot - WP chat bot plugin for WordPress scored90%from 54 tests.

About plugin

  • Plugin page: chatbot-com-ai-pl...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.0.0
  • WordPress version: 6.3.1
  • First release: Dec 17, 2019
  • Latest release: Dec 5, 2022
  • Number of updates: 23
  • Update frequency: every 47.1 days
  • Top authors: livechat (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /13,344 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.91ms] Passed 4 tests

An overview of server-side resources used by ChatBot - WP chat bot plugin for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.98 ▼6.87
Dashboard /wp-admin3.36 ▲0.0547.23 ▼1.14
Posts /wp-admin/edit.php3.47 ▲0.1153.17 ▲0.67
Add New Post /wp-admin/post-new.php5.94 ▲0.0596.46 ▼0.29
Media Library /wp-admin/upload.php3.28 ▲0.0543.13 ▲8.90

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

ChatBot - WP chat bot plugin for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.18 ▼0.451.77 ▼0.4346.36 ▲4.69
Dashboard /wp-admin2,220 ▲405.51 ▼0.1683.38 ▼7.6866.44 ▲27.47
Posts /wp-admin/edit.php2,131 ▲311.98 ▼0.0140.43 ▲0.1936.03 ▼2.78
Add New Post /wp-admin/post-new.php1,712 ▲17624.32 ▲6.15687.69 ▲3.1567.68 ▼8.52
Media Library /wp-admin/upload.php1,419 ▲194.18 ▼0.0399.67 ▼4.8472.02 ▲29.81

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 were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: bot, chatbot, live chat, chatbot plugin, chat bot

chatbot-com-ai-platform/chatbotcom.php 92% from 13 tests

The main PHP file in "ChatBot - WP chat bot plugin for WordPress" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("chatbot-com-ai-platform.php" instead of "chatbotcom.php")

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
There were no executable files found in this plugin1,149 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP2312321589
CSS117613448
JavaScript2190106
SVG3006

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods1029.41%
▷ Public methods1955.88%
▷ Protected methods00.00%
▷ Private methods1544.12%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/no-stories.png16.26KB7.22KB▼ 55.57%