83% wa-chatbox-manager

Code Review | Chatbox Manager

WordPress plugin Chatbox Manager scored83%from 54 tests.

About plugin

  • Plugin page: wa-chatbox-manager
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 27, 2019
  • Latest release: Nov 23, 2023
  • Number of updates: 22
  • Update frequency: every 67.6 days
  • Top authors: alexvtn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /17,683 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.03MB] [CPU: ▼4.54ms] Passed 4 tests

Server-side resources used by Chatbox Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.51 ▼5.04
Dashboard /wp-admin3.33 ▲0.0346.62 ▼4.18
Posts /wp-admin/edit.php3.45 ▲0.0947.57 ▼0.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.32 ▼8.80
Media Library /wp-admin/upload.php3.26 ▲0.0336.57 ▲0.27
Chatbox Manager /wp-admin/admin.php?page=chatbox_manager_panel3.2334.18

Server storage [IO: ▲0.74MB] [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: 80 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Chatbox Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9314.68 ▲0.461.55 ▼0.1736.42 ▼8.82
Dashboard /wp-admin2,240 ▲655.57 ▼0.1493.91 ▼19.5383.04 ▲39.16
Posts /wp-admin/edit.php2,155 ▲552.11 ▲0.1541.02 ▲2.4235.04 ▼2.15
Add New Post /wp-admin/post-new.php1,586 ▲4923.24 ▼2.10699.04 ▲23.66162.26 ▲89.76
Media Library /wp-admin/upload.php1,451 ▲514.25 ▲0.0995.10 ▲0.3571.45 ▲28.18
Chatbox Manager /wp-admin/admin.php?page=chatbox_manager_panel8962.1232.3061.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wa-chatbox-manager/init.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wa-chatbox-manager/core/functions/functions.php:132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wa-chatbox-manager/core/shortcode/button.php:142
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wa-chatbox-manager/core/admin/panel.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Option panel), #2 (Example of WhatsApp button), #3 (Available layouts (free and premium)), #4 (Popup chatbox (Premium))
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

wa-chatbox-manager/init.php 85% from 13 tests

The main PHP file in "Chatbox Manager" ver. 1.1.7 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("wa-chatbox-manager.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin3,243 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP81,2902311,657
CSS5184401,097
JavaScript5016783275
PO File1132211200
SVG10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity49.80
▷ Minimum class complexity3.00
▷ Maximum class complexity94.00
Average method complexity5.98
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods4795.92%
▷ Protected methods00.00%
▷ Private methods24.08%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.43MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/images/tip-logo.png9.73KB4.36KB▼ 55.18%
screenshot-3.png55.92KB19.20KB▼ 65.67%
screenshot-1.png29.88KB12.68KB▼ 57.57%
screenshot-4.png36.46KB14.68KB▼ 59.74%
core/assets/images/subparent.png0.94KB0.11KB▼ 88.00%