90% chat-button-for-woocommerce

Code Review | Chat Button For WooCommerce

WordPress plugin Chat Button For WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: chat-button-for-w...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Mar 20, 2020
  • Latest release: May 17, 2021
  • Number of updates: 9
  • Update frequency: every 47.0 days
  • Top authors: zeeshanelahi83 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,342 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.98ms] Passed 4 tests

An overview of server-side resources used by Chat Button For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.08 ▼4.07
Dashboard /wp-admin3.33 ▲0.0348.40 ▼4.37
Posts /wp-admin/edit.php3.38 ▲0.0349.83 ▼4.21
Add New Post /wp-admin/post-new.php5.91 ▲0.03101.88 ▼15.25
Media Library /wp-admin/upload.php3.26 ▲0.0338.36 ▲3.86

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Chat Button For WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.07 ▼0.551.68 ▲0.0941.57 ▼0.71
Dashboard /wp-admin2,195 ▲185.52 ▼0.0888.61 ▼2.9038.04 ▼3.39
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0140.50 ▲3.0434.78 ▼2.66
Add New Post /wp-admin/post-new.php1,526 ▼023.19 ▲0.16663.38 ▲9.5659.93 ▲4.36
Media Library /wp-admin/upload.php1,397 ▼04.14 ▼0.05118.31 ▲13.8548.14 ▲4.54

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: whatsapp, woo commerce, woo

chat-button-for-woocommerce/chat-button-for-woocommerce.php Passed 13 tests

The entry point to "Chat Button For WooCommerce" version 1.0 is a PHP file that has certain tags in its header comment area
124 characters long description:
This plugin will add WhatsApp Chat button in WooCommerce Store Theme next to "Add to Cart" button in product detail or view.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin80 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1232280

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected