88% fast-checkout-for-woocommerce

Code Review | Fast Checkout for WooCommerce

WordPress plugin Fast Checkout for WooCommerce scored 88% from 53 tests.

About plugin

  • Plugin page: fast-checkout-for...
  • Plugin version: 1.1.8
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 5.8.1
  • First release: Apr 13, 2021
  • Latest release: Oct 25, 2021
  • Number of updates: 33
  • Update frequency: every 6.1 days
  • Top authors: fastaf (72.73%)tessak22 (30.3%)

Code review

53 tests

User reviews

1 review

Install metrics

400+ active / 5,490 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: ▼285.48ms] Passed 4 tests

An overview of server-side resources used by Fast Checkout for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.85 ▲13.63
Dashboard /wp-admin3.06 ▲0.0140.09 ▼1.43
Posts /wp-admin/edit.php3.11 ▲0.0143.02 ▼0.06
Add New Post /wp-admin/post-new.php5.42 ▼0.01109.99 ▼1,133.01
Media Library /wp-admin/upload.php3.00 ▼0.0032.85 ▼7.43

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 321 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Fast Checkout for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,655 ▲4915.83 ▼0.149.09 ▲0.2144.62 ▼1.35
Dashboard /wp-admin2,936 ▲835.91 ▲0.05134.58 ▲1.96104.92 ▲3.21
Posts /wp-admin/edit.php2,710 ▲72.69 ▲0.0068.03 ▲3.3199.34 ▲7.00
Add New Post /wp-admin/post-new.php3,674 ▲2,09715.32 ▼1.80485.94 ▲134.63106.97 ▼1.43
Media Library /wp-admin/upload.php1,778 ▲64.99 ▼0.06163.26 ▲4.01124.26 ▲10.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/fast-checkout-for-woocommerce/vendor/freemius/wordpress-sdk/templates/ajax-loader.php
  • 78× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FastWC\\Blocks\\Block' not found in wp-content/plugins/fast-checkout-for-woocommerce/includes/blocks/class-cart.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fastwc_get_app_id() in wp-content/plugins/fast-checkout-for-woocommerce/templates/admin/tabs/fast-status.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'FASTWC_PATHincludes/blocks/class-block.php' (include_path='.:/usr/share/php') in wp-content/plugins/fast-checkout-for-woocommerce/includes/blocks.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/fast-checkout-for-woocommerce/includes/utilities.php:119
    • > 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 Notice
      Trying to access array offset on value of type null in wp-content/plugins/fast-checkout-for-woocommerce/vendor/freemius/wordpress-sdk/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'FastWC\\Routes\\Route' not found in wp-content/plugins/fast-checkout-for-woocommerce/includes/routes/class-order-post.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FastWC\\Routes\\Route' not found in wp-content/plugins/fast-checkout-for-woocommerce/includes/routes/class-plugin-info.php:15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fast-checkout-for-woocommerce/vendor/freemius/wordpress-sdk/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fast-checkout-for-woocommerce/vendor/freemius/wordpress-sdk/templates/account/partials/addon.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: woocommerce checkout, fast checkout, quick checkout, woocommerce, 1 click checkout...

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

The main file in "Fast Checkout for WooCommerce" v. 1.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to 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 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin55,752 lines of code in 264 files:
LanguageFilesBlank linesComment linesLines of code
PHP1878,29818,71334,719
PO File137,9829,63717,175
Sass34465802,862
Markdown31330465
JavaScript754100304
JSON400181
YAML22028
CSS140018

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity55.38
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes80
▷ Abstract classes56.25%
▷ Concrete classes7593.75%
▷ Final classes00.00%
Methods1,282
▷ Static methods21016.38%
▷ Public methods86667.55%
▷ Protected methods806.24%
▷ Private methods33626.21%
Functions226
▷ Named functions22398.67%
▷ Anonymous functions31.33%
Constants169
▷ Global constants14183.43%
▷ Class constants2816.57%
▷ Public constants28100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/img/after-atc-button.png11.03KB6.06KB▼ 45.04%
assets/img/after-quantity-selection.png11.06KB6.07KB▼ 45.14%
assets/img/other.png5.25KB2.58KB▼ 50.88%