94% add-whatsapp-button

Code Review | Add Chat App Button

WordPress plugin Add Chat App Button scored 94% from 54 tests.

About plugin

  • Plugin page: add-whatsapp-button
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 5.9.2
  • First release: Oct 29, 2018
  • Latest release: Feb 19, 2022
  • Number of updates: 77
  • Update frequency: every 15.7 days
  • Top authors: udidol (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

4,000+ active / 31,944 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼294.71ms] Passed 4 tests

This is a short check of server-side resources used by Add Chat App Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0156.10 ▲4.47
Dashboard /wp-admin3.44 ▲0.0335.58 ▲2.69
Posts /wp-admin/edit.php3.66 ▲0.0238.01 ▲1.81
Add New Post /wp-admin/post-new.php6.91 ▼0.0695.01 ▼1,176.39
Media Library /wp-admin/upload.php3.31 ▲0.0123.22 ▼6.94
Add WhatsApp Button /wp-admin/options-general.php?page=awb-options3.2622.07

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Add Chat App Button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,898 ▲15416.88 ▲1.2311.73 ▲4.832.32 ▲0.09
Dashboard /wp-admin2,909 ▲486.21 ▼0.00113.74 ▼24.93152.74 ▼10.44
Posts /wp-admin/edit.php2,707 ▲223.25 ▲0.0163.67 ▲2.20136.68 ▲3.25
Add New Post /wp-admin/post-new.php1,631 ▼3020.03 ▲3.62409.51 ▲13.88153.54 ▲2.10
Media Library /wp-admin/upload.php1,715 ▲175.55 ▲0.02156.84 ▲18.48188.09 ▼1.89
Add WhatsApp Button /wp-admin/options-general.php?page=awb-options2,4213.5776.84138.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 71 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=awb-options
    • > Notice in wp-content/plugins/add-whatsapp-button/admin/settings.php+399
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #5 (An example of a fixed button anchored in the bottom of the page) image missing
Please take inspiration from this readme.txt

add-whatsapp-button/add-whatsapp-button.php Passed 13 tests

"Add Chat App Button" version 2.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
73 characters long description:
Adds a Floating button to your website which opens a WhatsApp chat window

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,756 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PO File15465183

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.71
▷ Minimum class complexity3.00
▷ Maximum class complexity41.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods928.12%
▷ Public methods2887.50%
▷ Protected methods00.00%
▷ Private methods412.50%
▷ Named functions00.00%
▷ Anonymous functions1100.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.24MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/portrait_black.png109.84KB28.67KB▼ 73.90%
img/landscape_black.png128.09KB29.58KB▼ 76.91%