94% fast-checkout-for-woocommerce

Code Review | Fast Checkout for WooCommerce

WordPress plugin Fast Checkout for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: fast-checkout-for...
  • Plugin version: 1.1.18
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.9
  • WordPress version: 5.9.2
  • First release: Apr 13, 2021
  • Latest release: Mar 16, 2022
  • Number of updates: 43
  • Update frequency: every 8.0 days
  • Top authors: fastaf (79.07%)tessak22 (23.26%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 14,711 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Fast Checkout for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.71 ▼0.00
Dashboard /wp-admin3.41 ▲0.0137.11 ▼1.62
Posts /wp-admin/edit.php3.64 ▲0.0143.17 ▲2.40
Add New Post /wp-admin/post-new.php6.88 ▼0.09101.98 ▼1,214.68
Media Library /wp-admin/upload.php3.30 ▲0.0027.47 ▼0.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 281 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Fast Checkout for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲7815.57 ▼0.105.81 ▼1.312.27 ▼0.52
Dashboard /wp-admin2,901 ▲466.12 ▼0.10116.00 ▼21.10152.89 ▼8.75
Posts /wp-admin/edit.php2,698 ▲103.23 ▼0.0162.99 ▼0.85146.91 ▲5.31
Add New Post /wp-admin/post-new.php1,764 ▼921.90 ▲0.93427.90 ▼17.72158.20 ▼2.10
Media Library /wp-admin/upload.php1,704 ▲95.51 ▼0.02147.14 ▲0.01187.28 ▲1.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 80× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fastwc_load_template() in wp-content/plugins/fast-checkout-for-woocommerce/templates/admin/tabs/fast-options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fastwc_load_template() in wp-content/plugins/fast-checkout-for-woocommerce/templates/admin/tabs/fast-advanced.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FastWC\\Admin\\Fields\\Field' not found in wp-content/plugins/fast-checkout-for-woocommerce/includes/admin/fields/class-ajax-select.php:13
    • > PHP Warning
      Use of undefined constant FASTWC_PATH - assumed 'FASTWC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/fast-checkout-for-woocommerce/includes/third-party.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fast-checkout-for-woocommerce/includes/webhooks.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'FastWC\\Routes\\Route' not found in wp-content/plugins/fast-checkout-for-woocommerce/includes/routes/class-auth-test.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fastwc_load_template() in wp-content/plugins/fast-checkout-for-woocommerce/templates/fast-cart.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FastWC\\Routes\\Route' not found in wp-content/plugins/fast-checkout-for-woocommerce/includes/routes/class-shipping-zones.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fast-checkout-for-woocommerce/includes/admin/notices.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fastwc_load_template() in wp-content/plugins/fast-checkout-for-woocommerce/templates/admin/tabs/fast-third-party.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: woocommerce, fast, checkout, fast checkout, 1 click checkout...

fast-checkout-for-woocommerce/fast.php 92% from 13 tests

The entry point to "Fast Checkout for WooCommerce" version 1.1.18 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fast-checkout-for-woocommerce.php" instead of "fast.php")

Code Analysis 97% from 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 detected36,467 lines of code in 227 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity53.15
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
▷ Abstract classes67.14%
▷ Concrete classes7892.86%
▷ Final classes00.00%
▷ Static methods21016.08%
▷ Public methods87567.00%
▷ Protected methods957.27%
▷ Private methods33625.73%
▷ Named functions24798.02%
▷ Anonymous functions51.98%
▷ Global constants15184.36%
▷ Class constants2815.64%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/before-quantity-selection.png11.07KB6.06KB▼ 45.20%
assets/img/after-atc-button.png11.03KB6.06KB▼ 45.04%
assets/img/other.png5.25KB2.58KB▼ 50.88%
assets/img/after-quantity-selection.png11.06KB6.07KB▼ 45.14%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%