83% floating-quick-buy-button-for-woocommerce

Code Review | Floating Quick Buy Button for WooCommerce

WordPress plugin Floating Quick Buy Button for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: floating-quick-bu...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.5
  • WordPress version: 6.3.1
  • First release: Jan 19, 2018
  • Latest release: Jun 16, 2018
  • Number of updates: 8
  • Update frequency: every 19.5 days
  • Top authors: kraftpixel (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /2,972 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.32ms] Passed 4 tests

An overview of server-side resources used by Floating Quick Buy Button for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0049.27 ▲5.63
Dashboard /wp-admin3.31 ▲0.0050.92 ▼3.44
Posts /wp-admin/edit.php3.36 ▲0.0049.75 ▼5.79
Add New Post /wp-admin/post-new.php5.89 ▲0.00105.93 ▲5.77
Media Library /wp-admin/upload.php3.23 ▲0.0039.81 ▲2.31

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Floating Quick Buy Button for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.191.62 ▼0.0439.87 ▼0.16
Dashboard /wp-admin2,198 ▲215.61 ▼0.0594.95 ▲4.9041.32 ▼4.28
Posts /wp-admin/edit.php2,103 ▲32.00 ▲0.0038.52 ▼0.2737.00 ▲1.53
Add New Post /wp-admin/post-new.php1,535 ▲918.11 ▼4.88648.88 ▼11.1570.36 ▲16.65
Media Library /wp-admin/upload.php1,400 ▼34.14 ▼0.06111.51 ▲4.3848.12 ▲2.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/floating-quick-buy-button-for-woocommerce/admin/partials/mobile-quick-buy-kp-admin-display.php
    • > /wp-content/plugins/floating-quick-buy-button-for-woocommerce/public/partials/mobile-quick-buy-kp-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: The official readme.txt is a good inspiration

floating-quick-buy-button-for-woocommerce/mobile-quick-buy-kp.php 85% from 13 tests

The main file in "Floating Quick Buy Button for WooCommerce" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("floating-quick-buy-button-for-woocommerce.php" instead of "mobile-quick-buy-kp.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected967 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12164526441
CSS24535398
JavaScript33174114
SVG12014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.14
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.18MB with 0.13MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/mobile-frame-final.png183.36KB54.05KB▼ 70.52%