89% tt-one-page-checkout-for-woocommerce

Code Review | TT One-Page Checkout for WooCommerce

WordPress plugin TT One-Page Checkout for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: tt-one-page-check...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 29, 2022
  • Latest release: Dec 4, 2022
  • Number of updates: 3
  • Update frequency: every 52.7 days
  • Top authors: terrytsang (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /210 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.28ms] Passed 4 tests

This is a short check of server-side resources used by TT One-Page Checkout for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.67 ▲1.39
Dashboard /wp-admin3.31 ▼0.0445.97 ▼21.05
Posts /wp-admin/edit.php3.36 ▲0.0046.85 ▼9.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.40 ▼11.50
Media Library /wp-admin/upload.php3.23 ▲0.0037.67 ▲2.49

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by TT One-Page Checkout for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.16 ▼1.251.98 ▲0.1344.00 ▲1.21
Dashboard /wp-admin2,218 ▲125.85 ▼0.04104.45 ▼8.2642.24 ▼3.33
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0134.61 ▼2.6032.32 ▲1.23
Add New Post /wp-admin/post-new.php1,545 ▼023.37 ▲0.03648.92 ▼38.4554.06 ▲0.67
Media Library /wp-admin/upload.php1,400 ▲64.23 ▼0.06100.64 ▼3.8843.82 ▲0.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 ([screenhot-1.png] Screenshot Admin WooCommerce - One-Page Checkout options), #2 ([screenhot-2.png] Screenshot Frontend WooCommerce - Checkout page), #3 ([screenhot-3.png] Screenshot Frontend WooCommerce - Shop page with custom "Add to cart" button label)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === tt-one-page-checkout-for-woocommerce === )
The official readme.txt might help

tt-one-page-checkout-for-woocommerce/wc-one-page-checkout.php 92% from 13 tests

The entry point to "TT One-Page Checkout for WooCommerce" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tt-one-page-checkout-for-woocommerce.php" instead of "wc-one-page-checkout.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,148 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS26074649
PHP111645365
PO File24851134

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
27 PNG files occupy 0.41MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-woocommerce-donation-checkout.png9.24KB4.20KB▼ 54.56%
assets/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
assets/css/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
assets/css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%