73% woo-direct-checkout-button

Code Review | Direct Checkout Button for WooCommerce

WordPress plugin Direct Checkout Button for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: woo-direct-checko...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.6
  • WordPress version: 6.3.1
  • First release: Jan 10, 2020
  • Latest release: Dec 12, 2020
  • Number of updates: 15
  • Update frequency: every 22.5 days
  • Top authors: techmix (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active /11,074 total downloads

Benchmarks

Plugin footprint 65% 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.03MB] [CPU: ▼5.38ms] Passed 4 tests

A check of server-side resources used by Direct Checkout Button for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.23 ▲2.87
Dashboard /wp-admin3.34 ▲0.0345.59 ▼5.30
Posts /wp-admin/edit.php3.39 ▲0.0343.69 ▼2.58
Add New Post /wp-admin/post-new.php5.92 ▲0.0379.32 ▼13.86
Media Library /wp-admin/upload.php3.26 ▲0.0334.81 ▲0.24
Direct checkout /wp-admin/admin.php?page=dicbw_wc_direct_checkout3.2530.18

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Direct Checkout Button for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.72 ▲0.441.66 ▲0.0345.78 ▲7.30
Dashboard /wp-admin2,198 ▲215.60 ▲0.0194.24 ▼8.1942.74 ▲0.18
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0833.63 ▼2.6233.29 ▼0.82
Add New Post /wp-admin/post-new.php1,526 ▼023.60 ▲0.68675.89 ▲42.8162.07 ▲17.03
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.0395.85 ▼11.8542.71 ▼3.26
Direct checkout /wp-admin/admin.php?page=dicbw_wc_direct_checkout8032.0024.5526.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'deactivate' not found or invalid function name
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/woo-direct-checkout-button/templates/page-admin.php:3

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

woo-direct-checkout-button/direct-checkout-button-for-woocommerce.php 77% from 13 tests

The main PHP script in "Direct Checkout Button for WooCommerce" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-direct-checkout-button.php" instead of "direct-checkout-button-for-woocommerce.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin365 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11194114365
HTML1380

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity2.78
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods33
▷ Static methods39.09%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.99MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/Screenshot_3.png18.97KB10.17KB▼ 46.38%
views/Screenshot_1.png15.93KB8.10KB▼ 49.14%
views/Screenshot_6.png477.09KB114.19KB▼ 76.06%
views/Screenshot_2.png5.65KB3.14KB▼ 44.31%
views/Screenshot_5.png478.14KB114.88KB▼ 75.97%