84% bot-libre-live-chat

Code Review | Bot Libre Live Chat

WordPress plugin Bot Libre Live Chat scored84%from 54 tests.

About plugin

  • Plugin page: bot-libre-live-chat
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 22, 2018
  • Latest release: Nov 6, 2018
  • Number of updates: 4
  • Update frequency: every 65.5 days
  • Top authors: paphus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /769 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Bot Libre Live Chat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.0544.60 ▼1.74
Dashboard /wp-admin3.62 ▼0.0158.67 ▼10.88
Posts /wp-admin/edit.php3.73 ▲0.0549.86 ▼1.43
Add New Post /wp-admin/post-new.php6.20 ▲0.0586.97 ▼48.23
Media Library /wp-admin/upload.php3.54 ▲0.0537.37 ▲2.30

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Bot Libre Live Chat
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.43 ▲0.291.82 ▲0.2044.52 ▼1.80
Dashboard /wp-admin2,195 ▲155.53 ▼0.0984.97 ▼8.0141.79 ▼0.26
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0235.89 ▼2.0635.13 ▲1.98
Add New Post /wp-admin/post-new.php1,545 ▼023.25 ▼0.07613.31 ▼89.3351.72 ▼21.26
Media Library /wp-admin/upload.php1,397 ▼04.23 ▼0.01104.05 ▼12.8342.85 ▼3.31

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_bot_libre_chat_widget
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bot-libre-live-chat/embed_live_chat_widget.php:11

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

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: Contributors not specified
You can look at the official readme.txt

bot-libre-live-chat/embed_live_chat_widget.php 92% from 13 tests

"Bot Libre Live Chat" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bot-libre-live-chat.php" instead of "embed_live_chat_widget.php")

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
Everything looks great! No dangerous files found in this plugin237 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13224237

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin