84% facebook-messenger-customer-chat

Code Review | Facebook Chat Plugin - Live Chat Plugin for WordPress

WordPress plugin Facebook Chat Plugin - Live Chat Plugin for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: facebook-messenge...
  • Plugin version: 2.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.9
  • WordPress version: 6.3.1
  • First release: Sep 26, 2018
  • Latest release: Jul 6, 2022
  • Number of updates: 44
  • Update frequency: every 31.5 days
  • Top authors: Facebook (100%)

Code review

54 tests

User reviews

289 reviews

Install metrics

100,000+ active /1,654,578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.01ms] Passed 4 tests

Analyzing server-side resources used by Facebook Chat Plugin - Live Chat Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.68 ▼3.12
Dashboard /wp-admin3.44 ▲0.1452.74 ▲1.95
Posts /wp-admin/edit.php3.56 ▲0.2043.81 ▼1.68
Add New Post /wp-admin/post-new.php6.04 ▲0.1689.61 ▼7.16
Media Library /wp-admin/upload.php3.37 ▲0.1435.43 ▼0.07
Facebook Chat /wp-admin/options-general.php?page=facebook-messenger-customer-chat3.3533.97

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Facebook Chat Plugin - Live Chat Plugin for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲9313.62 ▼0.764.79 ▲3.0743.05 ▲4.17
Dashboard /wp-admin2,234 ▲454.85 ▼0.05109.48 ▼11.2439.48 ▼6.90
Posts /wp-admin/edit.php2,117 ▲312.06 ▲0.0035.27 ▼4.2932.73 ▼1.89
Add New Post /wp-admin/post-new.php1,536 ▲2223.35 ▲5.63710.21 ▲75.8462.68 ▲1.56
Media Library /wp-admin/upload.php1,413 ▲314.27 ▲0.0398.28 ▲3.2941.01 ▼0.97
Facebook Chat /wp-admin/options-general.php?page=facebook-messenger-customer-chat9772.1127.0027.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/facebook-messenger-customer-chat/facebook-messenger-customer-chat.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/facebook-messenger-customer-chat/options.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: chat plugin, messaging, customer care, chat, facebook...

facebook-messenger-customer-chat/facebook-messenger-customer-chat.php 92% from 13 tests

The entry point to "Facebook Chat Plugin - Live Chat Plugin for WordPress" version 2.5 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 476 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected4,748 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PO File251,2341,2423,222
PHP4191351898
JavaScript21919268
CSS1427223
Markdown2390110
JSON10027

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity39.00
▷ Minimum class complexity13.00
▷ Maximum class complexity65.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods728.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/chevron-down.png1.86KB0.18KB▼ 90.09%
images/chevron-right.png1.85KB0.19KB▼ 89.72%
images/chevron.png1.96KB0.29KB▼ 85.44%