84% wc-guest-checkout-single-product

Code Review | WooCommerce Guest Checkout for Single Product

WordPress plugin WooCommerce Guest Checkout for Single Product scored84%from 54 tests.

About plugin

  • Plugin page: wc-guest-checkout...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.0.2
  • WordPress version: 6.3.1
  • First release: Aug 2, 2018
  • Latest release: Dec 24, 2018
  • Number of updates: 10
  • Update frequency: every 14.5 days
  • Top authors: hussainthaj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,333 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by WooCommerce Guest Checkout for Single Product
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.59 ▼6.72
Dashboard /wp-admin3.32 ▲0.0255.47 ▼2.38
Posts /wp-admin/edit.php3.37 ▲0.0149.25 ▼2.93
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.92 ▼12.89
Media Library /wp-admin/upload.php3.24 ▲0.0141.20 ▲0.58

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

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

Browser metrics Passed 4 tests

WooCommerce Guest Checkout for Single Product: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲16613.61 ▼1.015.09 ▲3.5042.43 ▼2.68
Dashboard /wp-admin2,222 ▲185.84 ▲0.94110.56 ▼10.3036.87 ▼2.51
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0236.61 ▼3.9236.94 ▼3.35
Add New Post /wp-admin/post-new.php1,530 ▼323.11 ▼0.15668.23 ▼26.1460.94 ▼6.73
Media Library /wp-admin/upload.php1,404 ▲44.07 ▼0.19117.96 ▲11.5047.32 ▲3.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wc-guest-checkout-single-product/public/partials/wc-guest-checkout-single-product-public-display.php
    • > /wp-content/plugins/wc-guest-checkout-single-product/admin/partials/wc-guest-checkout-single-product-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: Please take inspiration from this readme.txt

wc-guest-checkout-single-product/wc-guest-checkout-single-product.php 92% from 13 tests

The main file in "WooCommerce Guest Checkout for Single Product" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected227 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12126544206
Markdown113015
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected