89% echbay-facebook-messenger

Code Review | EchBay Live Chat

WordPress plugin EchBay Live Chat scored 89% from 54 tests.

About plugin

  • Plugin page: echbay-facebook-m...
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: May 7, 2017
  • Latest release: Aug 16, 2023
  • Number of updates: 108
  • Update frequency: every 21.2 days
  • Top authors: itvn9online (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 11,775 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▲0.54ms] Passed 4 tests

A check of server-side resources used by EchBay Live Chat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.27 ▼3.93
Dashboard /wp-admin3.40 ▲0.0951.98 ▲2.63
Posts /wp-admin/edit.php3.51 ▲0.1549.64 ▲5.04
Add New Post /wp-admin/post-new.php5.98 ▲0.0995.74 ▲0.23
Media Library /wp-admin/upload.php3.32 ▲0.0938.16 ▲3.24
Live Chat /wp-admin/admin.php?page=echbay-live-chat3.2930.61
Webgiare Plugins /wp-admin/admin.php?page=echbay-plugins-menu3.2937.91

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for EchBay Live Chat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.29 ▼1.301.75 ▲0.0242.83 ▲1.68
Dashboard /wp-admin2,233 ▲484.85 ▼0.97106.86 ▲4.1741.76 ▼3.39
Posts /wp-admin/edit.php2,116 ▲271.99 ▼0.0439.21 ▼2.0138.61 ▲0.73
Add New Post /wp-admin/post-new.php1,564 ▲4518.50 ▼4.39594.77 ▼63.0763.72 ▲5.10
Media Library /wp-admin/upload.php1,415 ▲274.23 ▼0.0498.09 ▼2.1244.72 ▼2.05
Live Chat /wp-admin/admin.php?page=echbay-live-chat2,00310.82288.1535.89
Webgiare Plugins /wp-admin/admin.php?page=echbay-plugins-menu1,9889.73287.1735.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 86% 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 need to be fixed:
  • Screenshots: These screenshots require images: #1 (Box chat close.), #2 (Box chat open.), #3 (Box chat setting in admin.)
The official readme.txt is a good inspiration

echbay-facebook-messenger/efm.php 77% from 13 tests

The entry point to "EchBay Live Chat" version 1.2.7 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("echbay-facebook-messenger.php" instead of "efm.php")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

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
Good job! No executable or dangerous file extensions detected446 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP1081420
SVG10114
HTML6015
JavaScript5005
CSS2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity7.10
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG files were detected