83% bubble-chat

Code Review | Bubble Chat

WordPress plugin Bubble Chat scored83%from 54 tests.

About plugin

  • Plugin page: bubble-chat
  • Plugin version: 3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Jul 13, 2022
  • Latest release: Nov 11, 2023
  • Number of updates: 33
  • Update frequency: every 14.7 days
  • Top authors: marcomireles (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,586 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.60ms] Passed 4 tests

Server-side resources used by Bubble Chat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.89 ▼4.87
Dashboard /wp-admin3.36 ▲0.0144.40 ▼15.20
Posts /wp-admin/edit.php3.47 ▲0.1148.51 ▼2.70
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.62 ▼15.64
Media Library /wp-admin/upload.php3.28 ▲0.0532.40 ▼0.95

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Bubble Chat: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲14313.55 ▼1.1710.10 ▲7.8581.30 ▲37.14
Dashboard /wp-admin2,207 ▲305.58 ▼0.0292.63 ▼1.1541.00 ▼2.33
Posts /wp-admin/edit.php2,112 ▲121.97 ▲0.0140.17 ▼3.2636.72 ▼0.43
Add New Post /wp-admin/post-new.php1,536 ▲723.04 ▼0.09651.31 ▲44.2261.82 ▲14.60
Media Library /wp-admin/upload.php1,415 ▲184.23 ▲0.0295.90 ▼1.5542.12 ▼0.14

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WA_Bubble_Settings' not found in wp-content/plugins/bubble-chat/views/whatsapp-bubble.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WA_Bubble_Settings' not found in wp-content/plugins/bubble-chat/views/templates/bubble.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bubble-chat/views/settings-page.php:5

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

bubble-chat/wa-bubble.php 85% from 13 tests

The principal PHP file in "Bubble Chat" v. 3.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bubble-chat.php" instead of "wa-bubble.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin2,397 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP81481261,061
Sass21611530
CSS4287515
JavaScript24142187
PO File14349102
SVG2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity22.67
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods49
▷ Static methods36.12%
▷ Public methods4795.92%
▷ Protected methods00.00%
▷ Private methods24.08%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.63MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/screenshot-1.png250.62KB87.47KB▼ 65.10%
assets/img/close.png0.63KB0.44KB▼ 30.00%
assets/img/whatsapp.png140.33KB116.31KB▼ 17.12%
assets/img/marcode.png38.33KB18.34KB▼ 52.16%
assets/img/screenshot-3.png74.80KB25.43KB▼ 66.00%