84% chat-plus

Code Review | Chat Plus - Unofficial Addon to disable chat on page and more

WordPress plugin Chat Plus - Unofficial Addon to disable chat on page and more scored84%from 54 tests.

About plugin

  • Plugin page: chat-plus
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.7.1
  • WordPress version: 6.3.1
  • First release: Apr 29, 2021
  • Latest release: May 12, 2021
  • Number of updates: 8
  • Update frequency: every 2.9 days
  • Top authors: concentricdigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /402 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.03MB] [CPU: ▼7.60ms] Passed 4 tests

Analyzing server-side resources used by Chat Plus - Unofficial Addon to disable chat on page and more
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.84 ▼1.88
Dashboard /wp-admin3.34 ▲0.0344.77 ▼6.72
Posts /wp-admin/edit.php3.39 ▲0.0345.85 ▼1.95
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.71 ▼18.90
Media Library /wp-admin/upload.php3.26 ▲0.0333.66 ▼2.81

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Chat Plus - Unofficial Addon to disable chat on page and more
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.46 ▼0.291.80 ▲0.0147.07 ▲4.79
Dashboard /wp-admin2,212 ▲234.88 ▼0.04103.55 ▼5.6538.99 ▼1.87
Posts /wp-admin/edit.php2,094 ▲81.99 ▼0.0243.43 ▲9.1335.41 ▲0.82
Add New Post /wp-admin/post-new.php1,539 ▲523.33 ▲0.14671.63 ▼19.9653.02 ▼7.86
Media Library /wp-admin/upload.php1,394 ▲94.24 ▲0.1495.80 ▼4.1343.83 ▼0.48

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chat-plus/chat-plus.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/chat-plus/metabox.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chat-plus/options.php:16

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Setting menu can be found grouped as submenu of Facebook Customer Chat tab on admin panel sidemenu), #2 (Screenshot of the addon setting page), #3 (Disable Facebook Customer Chat on certain page by ticking the option in metabox setting on post/page editing page)
The official readme.txt is a good inspiration

chat-plus/chat-plus.php 92% from 13 tests

"Chat Plus - Unofficial Addon to disable chat on page and more" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 214 characters long)

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
Everything looks great! No dangerous files found in this plugin444 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP463100340
JavaScript262258
CSS28446

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.00
▷ Minimum class complexity10.00
▷ Maximum class complexity18.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
imgs/Logo_Messenger.png98.23KB29.77KB▼ 69.69%