84% fb-messenger-livechat

Code Review | Messenger LiveChat

WordPress plugin Messenger LiveChat scored84%from 54 tests.

About plugin

  • Plugin page: fb-messenger-live...
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9
  • WordPress version: 6.3.1
  • First release: Aug 18, 2016
  • Latest release: Oct 8, 2018
  • Number of updates: 16
  • Update frequency: every 48.8 days
  • Top authors: widgetpack (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active /34,047 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.75ms] Passed 4 tests

A check of server-side resources used by Messenger LiveChat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.22 ▼5.94
Dashboard /wp-admin3.34 ▼0.0143.37 ▼16.82
Posts /wp-admin/edit.php3.39 ▲0.0343.46 ▼0.10
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.27 ▼4.12
Media Library /wp-admin/upload.php3.26 ▲0.0334.71 ▼0.02
Facebook Messenger /wp-admin/options-general.php?page=fbmsg3.2532.70

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Messenger LiveChat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19214.43 ▲0.1442.27 ▲39.7938.25 ▼3.59
Dashboard /wp-admin2,213 ▲254.85 ▼0.22102.42 ▼15.3838.61 ▼4.35
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0736.64 ▼0.3435.33 ▲1.34
Add New Post /wp-admin/post-new.php1,517 ▼1217.68 ▼0.75651.70 ▲1.8754.70 ▼2.93
Media Library /wp-admin/upload.php1,386 ▼54.28 ▲0.0595.35 ▼0.0340.65 ▼2.46
Facebook Messenger /wp-admin/options-general.php?page=fbmsg8962.0521.5132.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 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 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
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/fb-messenger-livechat/fbmsg.php on line 11
    • > PHP Warning
      require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in wp-content/plugins/fb-messenger-livechat/fbmsg.php on line 11
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHwp-includes/version.php' (include_path='.:/usr/share/php') in wp-content/plugins/fb-messenger-livechat/fbmsg.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/fb-messenger-livechat/fbmsg-setting.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (24 tag instead of maximum 10)
You can look at the official readme.txt

fb-messenger-livechat/fbmsg.php 92% from 13 tests

The main file in "Messenger LiveChat" v. 1.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fb-messenger-livechat.php" instead of "fbmsg.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin551 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23726349
CSS1247128
JavaScript112074

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected