77% sticky-chat-button

Code Review | Sticky Button - Click to Chat

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

About plugin

  • Plugin page: sticky-chat-button
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.6
  • WordPress version: 6.3.1
  • First release: Feb 5, 2021
  • Latest release: Feb 5, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: asmbrw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 3,272 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.47ms] Passed 4 tests

Analyzing server-side resources used by Sticky Button - Click to Chat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.74 ▼11.64
Dashboard /wp-admin3.34 ▲0.0356.73 ▲8.13
Posts /wp-admin/edit.php3.43 ▲0.0755.84 ▲12.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.26 ▼1.52
Media Library /wp-admin/upload.php3.24 ▲0.0134.54 ▼0.85

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

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

Browser metrics Passed 4 tests

Sticky Button - Click to Chat: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲20315.06 ▲0.441.67 ▼0.0344.08 ▼0.22
Dashboard /wp-admin2,355 ▲1646.45 ▲1.39125.19 ▲25.0439.92 ▼0.00
Posts /wp-admin/edit.php2,264 ▲1753.30 ▲1.3354.28 ▲18.3734.58 ▼1.04
Add New Post /wp-admin/post-new.php1,543 ▲2623.21 ▲5.61645.19 ▼10.7537.15 ▼21.47
Media Library /wp-admin/upload.php1,400 ▲124.09 ▼0.1081.57 ▼15.6741.01 ▼2.30

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sticky-chat-button/index.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sticky-chat-button/views/wasb-button.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sticky-chat-button/views/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Requires php: Version format is invalid
  • Screenshots: Please a description for screenshot #1 in sticky-chat-button/assets to your readme.txt
Please take inspiration from this readme.txt

sticky-chat-button/index.php 85% from 13 tests

The main file in "Sticky Button - Click to Chat" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sticky-chat-button.php" instead of "index.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected354 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32420354

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
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 functions228.57%
▷ Anonymous functions571.43%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/whatsapppng.png6.23KB3.16KB▼ 49.31%
assets/default111.png3.03KB1.91KB▼ 36.87%