78% inbbe-chat-bot

Code Review | Inbbe Chat Bot

WordPress plugin Inbbe Chat Bot scored 78% from 54 tests.

About plugin

  • Plugin page: inbbe-chat-bot
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.3.2
  • WordPress version: 5.9.2
  • First release: Mar 16, 2020
  • Latest release: Mar 16, 2020
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: inbbe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,074 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼2.53MB] [CPU: ▼345.13ms] Passed 4 tests

This is a short check of server-side resources used by Inbbe Chat Bot
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.84 ▼1.685.05 ▼46.02
Dashboard /wp-admin1.86 ▼1.553.78 ▼31.33
Posts /wp-admin/edit.php1.86 ▼1.783.54 ▼48.51
Add New Post /wp-admin/post-new.php1.86 ▼5.115.20 ▼1,254.67
Media Library /wp-admin/upload.php1.86 ▼1.4410.60 ▼13.73
Inbbe /wp-admin/options-general.php?page=inbbe1.865.81

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Inbbe Chat Bot
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,071 ▲32616.26 ▲0.6210.74 ▲4.262.11 ▼0.27
Dashboard /wp-admin2,927 ▲666.21 ▼0.08134.45 ▼10.03182.62 ▲9.69
Posts /wp-admin/edit.php2,695 ▲43.26 ▲0.02103.66 ▲38.03140.02 ▼2.91
Add New Post /wp-admin/post-new.php1,677 ▲1616.03 ▼0.37423.73 ▼32.41166.85 ▲8.13
Media Library /wp-admin/upload.php1,720 ▲255.56 ▲0.05139.24 ▼2.92188.89 ▲5.80
Inbbe /wp-admin/options-general.php?page=inbbe9802.3652.1082.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=inbbe
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=inbbe
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, function 'inbbe_options' not found or invalid function name

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 items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/inbbe-chat-bot/public/conf.php
    • > /wp-content/plugins/inbbe-chat-bot/includes/options.php

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 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

inbbe-chat-bot/chat-bot.php 92% from 13 tests

The principal PHP file in "Inbbe Chat Bot" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("inbbe-chat-bot.php" instead of "chat-bot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin767 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP711218315
CSS1237230
JavaScript2695222

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.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.16MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/bot.png119.73KB39.19KB▼ 67.27%
img/user.png21.93KB18.61KB▼ 15.13%
admin/img/user.png21.93KB18.61KB▼ 15.13%