78% wa-sticky-button

Code Review | WP Sticky Button - Click to Chat

WordPress plugin WP Sticky Button - Click to Chat scored 78% from 54 tests.

About plugin

  • Plugin page: wa-sticky-button
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 26, 2019
  • Latest release: Apr 9, 2023
  • Number of updates: 28
  • Update frequency: every 45.1 days
  • Top authors: farazquazi (85.71%)farazify (17.86%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10,000+ active / 54,135 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by WP Sticky Button - Click to Chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.49 ▼5.13
Dashboard /wp-admin3.35 ▲0.0547.71 ▲1.55
Posts /wp-admin/edit.php3.47 ▲0.1154.08 ▲6.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.27 ▼6.01
Media Library /wp-admin/upload.php3.25 ▲0.0338.81 ▲3.98

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Sticky Button - Click to Chat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲19214.67 ▲0.291.72 ▼0.1641.00 ▲2.29
Dashboard /wp-admin2,355 ▲1666.43 ▲1.55126.20 ▲5.4140.87 ▼6.91
Posts /wp-admin/edit.php2,258 ▲1663.33 ▲1.2752.08 ▲12.0830.98 ▼7.20
Add New Post /wp-admin/post-new.php1,524 ▼417.77 ▼0.26641.98 ▲21.3636.14 ▼14.64
Media Library /wp-admin/upload.php1,403 ▲154.17 ▲0.0184.33 ▼22.3845.69 ▲0.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wa-sticky-button/index.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wa-sticky-button/views/wasb-button.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wa-sticky-button/views/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

wa-sticky-button/index.php 92% from 13 tests

"WP Sticky Button - Click to Chat" version 1.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wa-sticky-button.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin419 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31924419

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/default.png6.23KB3.16KB▼ 49.31%