90% simple-chat-button

Code Review | Simple Chat Button

WordPress plugin Simple Chat Button scored90%from 54 tests.

About plugin

  • Plugin page: simple-chat-button
  • Plugin version: 1.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: Sep 4, 2021
  • Latest release: Aug 23, 2023
  • Number of updates: 13
  • Update frequency: every 55.3 days
  • Top authors: seramo (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active /44,094 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.07MB] [CPU: ▼4.43ms] Passed 4 tests

This is a short check of server-side resources used by Simple Chat Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.96 ▼4.22
Dashboard /wp-admin3.39 ▲0.0447.63 ▼7.63
Posts /wp-admin/edit.php3.44 ▲0.0846.93 ▼2.98
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.02 ▼2.89
Media Library /wp-admin/upload.php3.31 ▲0.0834.17 ▲0.07
Simple Chat Button /wp-admin/options-general.php?page=simple-chat-button3.3331.19

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 15 new options
New WordPress options
scb_button_status
widget_recent-comments
scb_desktop_bottom_margin
widget_recent-posts
scb_button_position
scb_button_target
scb_button_text
can_compress_scripts
scb_mobile_bottom_margin
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for Simple Chat Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.68 ▼0.974.97 ▲2.9545.48 ▲2.41
Dashboard /wp-admin2,213 ▲254.84 ▼1.02104.05 ▲4.5637.56 ▼2.60
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0435.52 ▼6.7533.12 ▼2.52
Add New Post /wp-admin/post-new.php6,244 ▲4,72521.61 ▼1.75888.82 ▲238.8653.81 ▼1.02
Media Library /wp-admin/upload.php1,395 ▲74.25 ▼0.0194.88 ▼2.3141.92 ▼0.67
Simple Chat Button /wp-admin/options-general.php?page=simple-chat-button8192.0324.5130.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: whatsapp, whatsapp business, chat, simple whatsapp chat button, chat button...

simple-chat-button/simple-chat-button.php Passed 13 tests

The principal PHP file in "Simple Chat Button" v. 1.7.0 is loaded by WordPress automatically on each request
66 characters long description:
Adds a beautiful WhatsApp Sticky Button on the WordPress frontend.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin546 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP73458439
PO File14148100
XML1007

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin