10% wp-chatbot

Code Review | WP-Chatbot for Messenger

WordPress plugin WP-Chatbot for Messenger scored10%from 54 tests.

About plugin

  • Plugin page: wp-chatbot
  • Plugin version: 4.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2017
  • Latest release: Oct 13, 2023
  • Number of updates: 160
  • Update frequency: every 13.4 days
  • Top authors: bhvreddy (48.75%)yankovski (47.5%)mobilemonkeydevops (4.38%)larrykim (1.25%)

Code review

54 tests

User reviews

53 reviews

Install metrics

6,000+ active /407,325 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wp-chatbot/inc/MobileMonkeyApi.php+103
    Undefined index: bot_id

Server metrics [RAM: ▼1.18MB] [CPU: ▼47.35ms] Passed 4 tests

A check of server-side resources used by WP-Chatbot for Messenger
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3245.06 ▲5.28
Dashboard /wp-admin2.76 ▼0.5410.88 ▼38.37
Posts /wp-admin/edit.php2.77 ▼0.599.96 ▼39.20
Add New Post /wp-admin/post-new.php2.77 ▼3.1212.53 ▼89.63
Media Library /wp-admin/upload.php2.77 ▼0.4612.81 ▼22.20

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 57 new files
Database: no new tables, 9 new options
New WordPress options
htcc_plugin_details
widget_recent-comments
theysaidso_admin_options
htcc_options
widget_recent-posts
mobilemonkey_token
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP-Chatbot for Messenger
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13014.35 ▲0.011.55 ▼0.0333.48 ▼5.54
Dashboard /wp-admin2,281 ▲1135.54 ▼0.0594.60 ▲3.77106.43 ▲60.37
Posts /wp-admin/edit.php2,181 ▲992.00 ▼0.0134.80 ▼4.1843.14 ▲10.18
Add New Post /wp-admin/post-new.php1,599 ▲7123.12 ▲2.16680.69 ▲61.0764.22 ▼6.69
Media Library /wp-admin/upload.php1,483 ▲834.31 ▲0.14114.25 ▼12.4179.14 ▲21.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-chatbot/inc/MobileMonkeyApi.php+103
    Undefined index: bot_id
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • htcc_options
    • htcc_plugin_details

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-chatbot/admin/commons/ht-cc-admin-fb-button-notice.php
    • > /wp-content/plugins/wp-chatbot/admin/commons/ht-cc-admin-fb-button-error.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: text in wp-content/plugins/wp-chatbot/admin/commons/ht-cc-admin-fb-button-notice.php on line 13
    • > PHP Notice
      Undefined variable: count in wp-content/plugins/wp-chatbot/admin/commons/ht-cc-admin-limit-tooltip.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-chatbot/admin/commons/ht-cc-admin-top-banner.php:133
    • > PHP Notice
      Undefined variable: text in wp-content/plugins/wp-chatbot/admin/commons/ht-cc-admin-fb-button-error.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/wp-chatbot/admin/contact_page.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-chatbot/admin/commons/ht-cc-admin-notice-not-connected.php:167
    • > PHP Notice
      Undefined variable: subscribe in wp-content/plugins/wp-chatbot/admin/commons/ht-cc-admin-limit-tooltip.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-chatbot/wp-chatbot.php 92% from 13 tests

"WP-Chatbot for Messenger" version 4.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin10,674 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP336646265,900
CSS3214343,324
JavaScript3166551,326
SVG401124

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity28.13
▷ Minimum class complexity1.00
▷ Maximum class complexity189.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods155
▷ Static methods106.45%
▷ Public methods13486.45%
▷ Protected methods00.00%
▷ Private methods2113.55%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants13
▷ Global constants13100.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
13 PNG files occupy 0.15MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/iphone_x.png41.36KB15.12KB▼ 63.45%
admin/assets/img/mobilemonkey_logo.png23.96KB14.44KB▼ 39.72%
admin/assets/img/pacebook_logo.png3.38KB2.35KB▼ 30.40%
admin/assets/img/exclamation.png13.50KB11.06KB▼ 18.01%
admin/assets/img/logo.png5.99KB4.15KB▼ 30.82%