84% quick-buy-now-button-for-woocommerce

Code Review | Quick Buy Now Button for WooCommerce

WordPress plugin Quick Buy Now Button for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: quick-buy-now-but...
  • Plugin version: 1.0.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2022
  • Latest release: Sep 22, 2023
  • Number of updates: 16
  • Update frequency: every 29.8 days
  • Top authors: tanvirul (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

4,000+ active /18,497 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.76ms] Passed 4 tests

This is a short check of server-side resources used by Quick Buy Now Button for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.50 ▲0.55
Dashboard /wp-admin3.31 ▲0.0149.04 ▼2.07
Posts /wp-admin/edit.php3.36 ▲0.0147.54 ▼2.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.13 ▼17.70
Media Library /wp-admin/upload.php3.23 ▲0.0035.46 ▼1.09

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Quick Buy Now Button for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.17 ▼1.261.72 ▼0.0044.03 ▲2.63
Dashboard /wp-admin2,218 ▲364.86 ▼1.00111.78 ▲0.4043.10 ▲2.45
Posts /wp-admin/edit.php2,100 ▲82.06 ▼0.0034.63 ▼4.8632.78 ▼3.67
Add New Post /wp-admin/post-new.php1,542 ▲923.11 ▲0.02634.21 ▲11.0451.97 ▼1.88
Media Library /wp-admin/upload.php1,394 ▲94.21 ▲0.02100.45 ▼2.0543.79 ▼3.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/quick-buy-now-button-for-woocommerce/includes/themes-support.php
    • > /wp-content/plugins/quick-buy-now-button-for-woocommerce/quick-buy-now-button-for-woocommerce.php

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 93% from 29 tests

readme.txt Passed 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
5 plugin tags: buy now button, woocommerce direct checkout, quick buy, buy now, woocommerce quick buy

quick-buy-now-button-for-woocommerce/quick-buy-now-button-for-woocommerce.php 85% from 13 tests

This is the main PHP file of "Quick Buy Now Button for WooCommerce" version 1.0.10, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)

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
No dangerous file extensions were detected1,199 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP72301541,171
JavaScript13423
XML1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity31.25
▷ Minimum class complexity3.00
▷ Maximum class complexity67.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods51
▷ Static methods35.88%
▷ Public methods4180.39%
▷ Protected methods1019.61%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin