10% css-chat-button

Code Review | CSS chat button

WordPress plugin CSS chat button scored 10% from 54 tests.

About plugin

  • Plugin page: css-chat-button
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2023
  • Latest release: Sep 7, 2023
  • Number of updates: 10
  • Update frequency: every 9.6 days
  • Top authors: atakanau (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 140 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/css-chat-button/includes/class-css-chat-button.php+240
    Undefined variable: defaults

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.73ms] Passed 4 tests

This is a short check of server-side resources used by CSS chat button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.99 ▲0.96
Dashboard /wp-admin3.46 ▲0.1546.04 ▼0.40
Posts /wp-admin/edit.php3.57 ▲0.2153.08 ▲9.03
Add New Post /wp-admin/post-new.php6.05 ▲0.1784.46 ▼11.42
Media Library /wp-admin/upload.php3.38 ▲0.1533.47 ▼0.07
CSS chat button /wp-admin/options-general.php?page=css-chat-button-options3.3529.88

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
css-chat-button-settings
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for CSS chat button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10913.32 ▼1.062.08 ▲0.5038.17 ▼1.37
Dashboard /wp-admin2,222 ▲344.91 ▲0.03109.69 ▼1.1139.61 ▼3.06
Posts /wp-admin/edit.php2,108 ▲332.01 ▼0.0137.44 ▲1.8033.34 ▼0.01
Add New Post /wp-admin/post-new.php1,529 ▼423.33 ▲0.11651.00 ▲22.8051.04 ▼8.76
Media Library /wp-admin/upload.php1,404 ▲134.23 ▼0.01108.06 ▲6.0443.99 ▼2.17
CSS chat button /wp-admin/options-general.php?page=css-chat-button-options9671.7125.0531.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • css-chat-button-settings
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/css-chat-button/public/partials/css-chat-button-display.php
    • > /wp-content/plugins/css-chat-button/admin/partials/css-chat-button-admin-display.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=css-chat-button-options
    • > Network (severe)
    wp-content/plugins/css-chat-button/admin/assets/jqcolorpicker/mod.css?ver=1.0.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=css-chat-button-options
    • > Network (severe)
    wp-content/plugins/css-chat-button/admin/assets/jqcolorpicker/colors.js?ver=1.0.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=css-chat-button-options
    • > Network (severe)
    wp-content/plugins/css-chat-button/admin/assets/jqcolorpicker/jqColorPicker.min.js?ver=1.0.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=css-chat-button-options
    • > Network (severe)
    wp-content/plugins/css-chat-button/admin/assets/jqcolorpicker/index.js?ver=1.0.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=css-chat-button-options
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=css-chat-button-options 148 The specified value "#" cannot be parsed, or is out of range.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: chat, whatsapp, click to chat, button, whatsapp chat

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

The principal PHP file in "CSS chat button" v. 1.0.1 is loaded by WordPress automatically on each request
125 characters long description:
Compact Simple Speedy chat button. It allows visitors to contact you via WhatsApp. Lightweight and fast loading for best SEO.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin843 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13185580570
CSS351128224
JavaScript273143
HTML1006

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.14
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3888.37%
▷ Protected methods00.00%
▷ Private methods511.63%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin