67% chatbro

Code Review | Chat Bro Live Group Chat

WordPress plugin Chat Bro Live Group Chat scored67%from 54 tests.

About plugin

  • Plugin page: chatbro
  • Plugin version: 4.0.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Jun 12, 2023
  • Number of updates: 156
  • Update frequency: every 16.7 days
  • Top authors: yozeg (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

300+ active /32,806 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.59MB] [CPU: ▼1.90ms] Passed 4 tests

Analyzing server-side resources used by Chat Bro Live Group Chat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6353.15 ▲14.75
Dashboard /wp-admin3.91 ▲0.5651.84 ▼9.33
Posts /wp-admin/edit.php3.96 ▲0.6048.12 ▲2.18
Add New Post /wp-admin/post-new.php6.49 ▲0.6091.39 ▼4.21
Media Library /wp-admin/upload.php3.83 ▲0.6039.43 ▲3.78

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 67 new files
Database: no new tables, 16 new options
New WordPress options
chatbro_chat_display_to_guests
chatbro_caps_initialized
chatbro_chat_user_profile_url
chatbro_chat_guid
theysaidso_admin_options
widget_theysaidso_widget
chatbro_enable_shortcodes
chatbro_chat_selected_pages
widget_chatbro
chatbro_chat_secret
...

Browser metrics Passed 4 tests

Chat Bro Live Group Chat: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.62 ▼0.965.65 ▲3.8642.50 ▲0.86
Dashboard /wp-admin2,209 ▲235.85 ▲0.8897.91 ▼11.3373.23 ▲32.21
Posts /wp-admin/edit.php2,104 ▲121.99 ▼0.0134.80 ▲0.6733.33 ▲2.26
Add New Post /wp-admin/post-new.php1,536 ▲1718.47 ▼4.49687.63 ▲11.8960.33 ▲3.81
Media Library /wp-admin/upload.php1,403 ▲214.24 ▲0.0497.87 ▼2.9369.78 ▲24.79

Uninstaller [IO: ▲2.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall correctly, leaving 67 files (2.00MB) in the plugin directory
    • (new file) backends/chats.php
    • (new file) backends/user.php
    • (new file) backends/admin.php
    • (new file) backends/permissions.php
    • (new file) backends/version.php
    • (new file) common/admin/admin.php
    • (new file) backends/api.php
    • (new file) backends/utils.php
    • (new file) backends/settings.php
    • (new file) LICENCE.txt
    • ...
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_chatbro
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • chatbro_caps_initialized
    • theysaidso_admin_options
    • chatbro_chat_list
    • db_upgraded
    • widget_recent-posts

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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 13× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/chatbro/wp_common.php
    • > /wp-content/plugins/chatbro/backends/settings.php
    • > /wp-content/plugins/chatbro/backends/permissions.php
    • > /wp-content/plugins/chatbro/backends/version.php
    • > /wp-content/plugins/chatbro/widget.php
    • > /wp-content/plugins/chatbro/index.php
    • > /wp-content/plugins/chatbro/backends/api.php
    • > /wp-content/plugins/chatbro/backends/user.php
    • > /wp-content/plugins/chatbro/shortcode.php
    • > /wp-content/plugins/chatbro/init.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'ICBroChat' not found in wp-content/plugins/chatbro/common/chats/chat.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ICBroSetting' not found in wp-content/plugins/chatbro/common/settings/setting.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ICBroChat' not found in wp-content/plugins/chatbro/common/chats/chat.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ICBroChat' not found in wp-content/plugins/chatbro/common/chats/chat.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ICBroChat' not found in wp-content/plugins/chatbro/common/chats/chat.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ICBroChat' not found in wp-content/plugins/chatbro/common/chats/chat.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CBroBackendable' not found in wp-content/plugins/chatbro/common/api/api.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/chatbro/common/settings/settings_translations.php:3

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 87% 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: Too many tags (98 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4, #5, #6, #7 in chatbro/assets to your readme.txt
You can take inspiration from this readme.txt

chatbro/index.php 85% from 13 tests

The entry point to "Chat Bro Live Group Chat" version 4.0.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 269 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("chatbro.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected7,118 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP468536144,157
SVG2002,959
CSS10111
JavaScript1001
HTML1020

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.28
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces9
Traits0
Classes52
▷ Abstract classes00.00%
▷ Concrete classes52100.00%
▷ Final classes00.00%
Methods411
▷ Static methods12229.68%
▷ Public methods35786.86%
▷ Protected methods61.46%
▷ Private methods4811.68%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants39
▷ Global constants00.00%
▷ Class constants39100.00%
▷ Public constants39100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
favicon_small.png0.63KB0.34KB▼ 46.44%