89% fast-chat-button

Code Review | Fast Chat Button

WordPress plugin Fast Chat Button scored89%from 54 tests.

About plugin

  • Plugin page: fast-chat-button
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 8, 2020
  • Latest release: Aug 21, 2023
  • Number of updates: 22
  • Update frequency: every 54.6 days
  • Top authors: yydevelopment (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /9,020 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.69ms] Passed 4 tests

An overview of server-side resources used by Fast Chat Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.86 ▲0.83
Dashboard /wp-admin3.32 ▲0.0144.59 ▼6.38
Posts /wp-admin/edit.php3.37 ▲0.0145.74 ▼1.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.85 ▼7.78
Media Library /wp-admin/upload.php3.24 ▲0.0136.14 ▲1.74
Fast Whatsapp Button /wp-admin/options-general.php?page=yydev-chat-btn3.3136.37

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Fast Chat Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9814.48 ▲0.152.21 ▲0.6242.60 ▲4.08
Dashboard /wp-admin2,210 ▲194.84 ▼1.06108.48 ▲2.6438.99 ▼5.74
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0441.72 ▲4.2233.96 ▼2.77
Add New Post /wp-admin/post-new.php1,536 ▼023.12 ▼0.00649.39 ▼2.3458.03 ▼1.28
Media Library /wp-admin/upload.php1,395 ▲134.22 ▼0.0699.98 ▲1.2042.37 ▲0.09
Fast Whatsapp Button /wp-admin/options-general.php?page=yydev-chat-btn1,3893.1148.5878.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • yydev_chat_btn
    • widget_theysaidso_widget
    • yydev_chat_btn_timestamp
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Requires at least: Version not formatted correctly
The official readme.txt might help

fast-chat-button/index.php 92% from 13 tests

The main PHP file in "Fast Chat Button" ver. 2.1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("fast-chat-button.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin784 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9337191784

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions17
▷ Named functions1482.35%
▷ Anonymous functions317.65%
Constants0
▷ Global constants00.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
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/chat-button3.png2.31KB2.37KB0.00%
images/chat-button1.png2.06KB2.10KB0.00%
images/chat-button2.png1.94KB1.98KB0.00%
images/icon.png2.62KB2.65KB0.00%