94% direct-checkout-for-woocommerce

Code Review | Direct Checkout for WooCommerce - Skip Cart with Buy Buttons

WordPress plugin Direct Checkout for WooCommerce - Skip Cart with Buy Buttons scored 94% from 54 tests.

About plugin

  • Plugin page: direct-checkout-f...
  • Plugin version: 1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.8.1
  • First release: Jan 13, 2019
  • Latest release: Jan 24, 2022
  • Number of updates: 10
  • Update frequency: every 110.7 days
  • Top authors: merlinmonmouth (60%)WebFactory (50%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active / 6,788 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

An overview of server-side resources used by Direct Checkout for WooCommerce - Skip Cart with Buy Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0028.31 ▲5.12
Dashboard /wp-admin3.07 ▲0.0036.38 ▼6.12
Posts /wp-admin/edit.php3.12 ▲0.0135.66 ▲3.04
Add New Post /wp-admin/post-new.php5.43 ▼0.0172.71 ▼569.50
Media Library /wp-admin/upload.php3.01 ▲0.0126.64 ▼2.32

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Direct Checkout for WooCommerce - Skip Cart with Buy Buttons: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.57 ▼0.056.14 ▲1.2777.73 ▲2.86
Dashboard /wp-admin2,930 ▲356.09 ▼0.07120.86 ▼12.56169.12 ▼2.00
Posts /wp-admin/edit.php2,740 ▼03.23 ▲0.0161.14 ▼2.47139.41 ▲2.19
Add New Post /wp-admin/post-new.php3,743 ▲719.10 ▲1.26426.20 ▼25.48159.33 ▼4.84
Media Library /wp-admin/upload.php1,749 ▼35.47 ▼0.03138.85 ▼0.26189.06 ▲3.66

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/direct-checkout-for-woocommerce/admin/class-wc-direct-checkout-tools.php
    • > /wp-content/plugins/direct-checkout-for-woocommerce/wc-direct-to-checkout-with-buttons.php
    • > /wp-content/plugins/direct-checkout-for-woocommerce/admin/templates/admin-info-message.php
    • > /wp-content/plugins/direct-checkout-for-woocommerce/admin/class-wc-direct-checkout-admin.php
    • > /wp-content/plugins/direct-checkout-for-woocommerce/admin/templates/admin-error-message.php
    • > /wp-content/plugins/direct-checkout-for-woocommerce/admin/templates/main-admin.php
    • > /wp-content/plugins/direct-checkout-for-woocommerce/class-wc-direct-checkout-frontend.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: buy button, woocommerce, skip cart, direct checkout, straight to checkout...

direct-checkout-for-woocommerce/wc-direct-to-checkout-with-buttons.php 92% from 13 tests

The primary PHP file in "Direct Checkout for WooCommerce - Skip Cart with Buy Buttons" version 1.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("direct-checkout-for-woocommerce.php" instead of "wc-direct-to-checkout-with-buttons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected395 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP77294395

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.00
▷ Minimum class complexity3.00
▷ Maximum class complexity11.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected