84% widgetwhats-app

Code Review | Widget Click to Chat

WordPress plugin Widget Click to Chat scored84%from 54 tests.

About plugin

  • Plugin page: widgetwhats-app
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Oct 18, 2018
  • Latest release: Sep 13, 2022
  • Number of updates: 17
  • Update frequency: every 83.9 days
  • Top authors: webhappen (52.94%)creapuntome (47.06%)pacotole (11.76%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /27,734 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.65ms] Passed 4 tests

Analyzing server-side resources used by Widget Click to Chat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.02 ▲1.57
Dashboard /wp-admin3.35 ▲0.0544.27 ▼1.10
Posts /wp-admin/edit.php3.40 ▲0.0443.37 ▼6.76
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.81 ▼18.31
Media Library /wp-admin/upload.php3.27 ▲0.0436.67 ▼0.42

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Widget Click to Chat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8613.30 ▼1.101.58 ▼0.1539.09 ▼4.53
Dashboard /wp-admin2,227 ▲365.85 ▲0.9697.97 ▼6.2236.69 ▼6.70
Posts /wp-admin/edit.php2,110 ▲182.05 ▲0.0537.65 ▼5.1730.64 ▼6.65
Add New Post /wp-admin/post-new.php1,555 ▲2718.61 ▲0.12612.06 ▼13.4568.12 ▲19.43
Media Library /wp-admin/upload.php1,409 ▲184.27 ▲0.0697.21 ▼1.2539.80 ▼2.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/widgetwhats-app/widgetwhats.php:151
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/widgetwhats-app/settings.php:5

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: whatsapp button, whatsapp chat, widgetwhatscom, whatsapp business, whatsapp widget...

widgetwhats-app/widgetwhats.php 92% from 13 tests

The primary PHP file in "Widget Click to Chat" version 2.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("widgetwhats-app.php" instead of "widgetwhats.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 plugin230 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23746230

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin