67% chatbot-for-messenger

Code Review | ChatBot for Social Media

WordPress plugin ChatBot for Social Media scored 67% from 54 tests.

About plugin

  • Plugin page: chatbot-for-messe...
  • Plugin version: 0.9.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: May 1, 2019
  • Latest release: Aug 9, 2023
  • Number of updates: 26
  • Update frequency: every 60.0 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 4,068 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.36ms] Passed 4 tests

Analyzing server-side resources used by ChatBot for Social Media
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.48 ▼9.10
Dashboard /wp-admin3.38 ▲0.0856.85 ▲4.68
Posts /wp-admin/edit.php3.50 ▲0.1460.15 ▲9.69
Add New Post /wp-admin/post-new.php5.96 ▲0.08109.02 ▼4.48
Media Library /wp-admin/upload.php3.28 ▲0.0539.36 ▼0.53
Manage FB Pages /wp-admin/admin.php?page=wpbot-fb-private-replies3.2851.92
Messenger Chatbot /wp-admin/admin.php?page=wbfb-botsetting-page3.2853.43

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 123 new files
Database: 3 new tables, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for ChatBot for Social Media
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲19015.05 ▲1.841.82 ▼0.2644.41 ▼6.08
Dashboard /wp-admin2,385 ▲1796.74 ▲0.91131.15 ▲22.1642.98 ▼0.81
Posts /wp-admin/edit.php2,294 ▲2053.66 ▲1.6657.05 ▲20.2135.36 ▲1.33
Add New Post /wp-admin/post-new.php1,551 ▲1824.30 ▲0.80705.58 ▲103.9235.01 ▼20.90
Media Library /wp-admin/upload.php1,430 ▲424.38 ▲0.1682.92 ▼33.0441.70 ▼1.05
Manage FB Pages /wp-admin/admin.php?page=wpbot-fb-private-replies9953.3642.0431.69
Messenger Chatbot /wp-admin/admin.php?page=wbfb-botsetting-page1,1623.5343.4335.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_wpbot_fb_broadcasts
    • wp_wpbot_fb_pages
    • wp_wpbot_fb_subscribers
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/chatbot-for-messenger/wpbot-fb-messenger-addon.php
  • 46× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNodeFactory' not found in wp-content/plugins/chatbot-for-messenger/vendor/facebook/graph-sdk/src/Facebook/GraphNodes/GraphObjectFactory.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\Http\\RequestBodyInterface' not found in wp-content/plugins/chatbot-for-messenger/vendor/facebook/graph-sdk/src/Facebook/Http/RequestBodyMultipart.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\PseudoRandomString\\PseudoRandomStringGeneratorInterface' not found in wp-content/plugins/chatbot-for-messenger/vendor/facebook/graph-sdk/src/Facebook/PseudoRandomString/McryptPseudoRandomStringGenerator.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/chatbot-for-messenger/vendor/facebook/graph-sdk/src/Facebook/GraphNodes/GraphAchievement.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Facebook\\HttpClients\\FacebookHttpClientInterface' not found in wp-content/plugins/chatbot-for-messenger/vendor/facebook/graph-sdk/src/Facebook/HttpClients/FacebookCurlHttpClient.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\Collection' not found in wp-content/plugins/chatbot-for-messenger/vendor/facebook/graph-sdk/src/Facebook/GraphNodes/GraphNode.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Helpers\\FacebookSignedRequestFromInputHelper' not found in wp-content/plugins/chatbot-for-messenger/vendor/facebook/graph-sdk/src/Facebook/Helpers/FacebookCanvasHelper.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Exceptions\\FacebookSDKException' not found in wp-content/plugins/chatbot-for-messenger/vendor/facebook/graph-sdk/src/Facebook/Exceptions/FacebookResumableUploadException.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphNodes\\GraphNode' not found in wp-content/plugins/chatbot-for-messenger/vendor/facebook/graph-sdk/src/Facebook/GraphNodes/GraphSessionInfo.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatbot-for-messenger/wpbot-fb-ajax-handler.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: auto comment, facebook messenger, messenger, chatbot

chatbot-for-messenger/wpbot-fb-messenger-addon.php 69% from 13 tests

"ChatBot for Social Media" version 0.9.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("chatbot-for-messenger.php" instead of "wpbot-fb-messenger-addon.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: The required version number must match the one declared in readme.txt ("4.9" instead of "4.6")
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin10,769 lines of code in 104 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.44
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
▷ Abstract classes11.39%
▷ Concrete classes7198.61%
▷ Final classes00.00%
▷ Static methods203.66%
▷ Public methods50291.77%
▷ Protected methods264.75%
▷ Private methods193.47%
▷ Named functions6794.37%
▷ Anonymous functions45.63%
▷ Global constants28.33%
▷ Class constants2291.67%
▷ Public constants22100.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
PNG images were not found in this plugin