84% chatflow-chat-widget

Code Review | ChatFlow - Click To Chat Widget for Website

WordPress plugin ChatFlow - Click To Chat Widget for Website scored84%from 54 tests.

About plugin

  • Plugin page: chatflow-chat-widget
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Nov 17, 2018
  • Latest release: Apr 28, 2020
  • Number of updates: 11
  • Update frequency: every 48.0 days
  • Top authors: chatflow (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,284 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by ChatFlow - Click To Chat Widget for Website
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.84 ▲11.47
Dashboard /wp-admin3.32 ▲0.0244.83 ▼1.57
Posts /wp-admin/edit.php3.37 ▲0.0246.66 ▼4.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.75 ▼12.24
Media Library /wp-admin/upload.php3.24 ▲0.0237.16 ▲3.86

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ChatFlow - Click To Chat Widget for Website
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.25 ▼1.141.67 ▼0.0537.13 ▼3.70
Dashboard /wp-admin2,221 ▲335.84 ▼0.0696.57 ▼7.1363.50 ▲21.15
Posts /wp-admin/edit.php2,107 ▲182.02 ▲0.0438.61 ▼4.8233.13 ▼3.89
Add New Post /wp-admin/post-new.php1,527 ▼517.52 ▼5.47737.06 ▲135.6453.46 ▼9.56
Media Library /wp-admin/upload.php1,400 ▲124.25 ▲0.06101.06 ▲4.3145.25 ▲1.53

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/chatflow-chat-widget/cfplugin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were 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
These attributes need your attention:
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

chatflow-chat-widget/cfplugin.php 92% from 13 tests

"ChatFlow - Click To Chat Widget for Website" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("chatflow-chat-widget.php" instead of "cfplugin.php")

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
There were no executable files found in this plugin55 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP114755

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods342.86%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.44KB0.60KB0.00%
images/chatflow-io-logo.png16.96KB6.56KB▼ 61.33%