84% melu-live-chat

Code Review | Melu Managed Live Chat

WordPress plugin Melu Managed Live Chat scored84%from 54 tests.

About plugin

  • Plugin page: melu-live-chat
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1
  • WordPress version: 6.3.1
  • First release: Oct 17, 2019
  • Latest release: Mar 30, 2023
  • Number of updates: 18
  • Update frequency: every 70.1 days
  • Top authors: melulivechat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,234 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.69ms] Passed 4 tests

A check of server-side resources used by Melu Managed Live Chat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.13 ▼1.88
Dashboard /wp-admin3.41 ▲0.1148.44 ▼3.95
Posts /wp-admin/edit.php3.52 ▲0.1748.10 ▼7.12
Add New Post /wp-admin/post-new.php5.99 ▲0.1090.87 ▼13.82
Media Library /wp-admin/upload.php3.33 ▲0.1041.69 ▲2.37

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
MeluLiveChat_Plugin__installed
widget_recent-comments
MeluLiveChat_Plugin__version

Browser metrics Passed 4 tests

Checking browser requirements for Melu Managed Live Chat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14213.12 ▼1.142.14 ▲0.4845.54 ▲4.58
Dashboard /wp-admin2,259 ▲714.94 ▼0.88103.09 ▼3.8870.60 ▲26.49
Posts /wp-admin/edit.php2,145 ▲532.02 ▲0.0038.67 ▲0.2734.67 ▼2.06
Add New Post /wp-admin/post-new.php1,722 ▲18922.43 ▼0.90739.08 ▲81.1847.70 ▼8.54
Media Library /wp-admin/upload.php1,435 ▲444.22 ▼0.0496.76 ▼15.3379.18 ▲29.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • MeluLiveChat_Plugin__version
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • MeluLiveChat_Plugin__installed

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 everything seems fine, this is not 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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/melu-live-chat/admin/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Transport_cURL' not found in wp-content/plugins/melu-live-chat/Requests_Transport_cURL_Extended.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/melu-live-chat/melu-live-chat.php:58

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

melu-live-chat/melu-live-chat.php 92% from 13 tests

The entry point to "Melu Managed Live Chat" version 1.7 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin942 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10168445656
Sass2556259
SVG10119
JavaScript1107
CSS1011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.86
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes228.57%
▷ Concrete classes571.43%
▷ Final classes00.00%
Methods80
▷ Static methods00.00%
▷ Public methods5265.00%
▷ Protected methods2835.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
data/melu-logo.png45.28KB16.87KB▼ 62.76%