84% woo-direct-checkout-lite

Code Review | Direct Checkout for WooCommerce Lite

WordPress plugin Direct Checkout for WooCommerce Lite scored84%from 54 tests.

About plugin

  • Plugin page: woo-direct-checko...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Sep 19, 2019
  • Latest release: Sep 25, 2020
  • Number of updates: 10
  • Update frequency: every 37.2 days
  • Top authors: centangle (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /8,686 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.41ms] Passed 4 tests

Server-side resources used by Direct Checkout for WooCommerce Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.85 ▼5.05
Dashboard /wp-admin3.35 ▲0.0545.51 ▼1.23
Posts /wp-admin/edit.php3.40 ▲0.0444.87 ▼5.21
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.14 ▼14.13
Media Library /wp-admin/upload.php3.27 ▲0.0435.92 ▼0.81
Direct checkout for woocommerce lite /wp-admin/admin.php?page=chk_settings3.2434.54

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Direct Checkout for WooCommerce Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲20914.00 ▼0.625.00 ▲3.0141.89 ▼2.02
Dashboard /wp-admin2,235 ▲445.26 ▼0.63113.61 ▲1.1540.13 ▲2.24
Posts /wp-admin/edit.php2,120 ▲312.46 ▲0.4242.64 ▲2.5933.80 ▼3.20
Add New Post /wp-admin/post-new.php1,539 ▲623.66 ▲0.47685.05 ▲9.7135.74 ▼15.66
Media Library /wp-admin/upload.php1,417 ▲294.48 ▲0.26114.42 ▲1.5446.80 ▲0.07
Direct checkout for woocommerce lite /wp-admin/admin.php?page=chk_settings1,4022.3750.4430.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-direct-checkout-lite/checkout_setting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-direct-checkout-lite/checkout_setting.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: custom add to cart, custom button, add to cart, buy now, direct checkout...

woo-direct-checkout-lite/woo-direct-checkout-lite.php 85% from 13 tests

This is the main PHP file of "Direct Checkout for WooCommerce Lite" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected399 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3520241
CSS31528120
JavaScript28238

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin