89% custom-thank-you-for-woocommerce

Code Review | Custom Thank You for WooCommerce

WordPress plugin Custom Thank You for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: custom-thank-you-...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-5.9.0
  • WordPress version: 5.8.1
  • First release: Feb 26, 2020
  • Latest release: Feb 1, 2022
  • Number of updates: 17
  • Update frequency: every 41.5 days
  • Top authors: artiosmedia (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 2,161 total downloads

Benchmarks

Plugin footprint 83% from 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.00MB] [CPU: ▼152.05ms] Passed 4 tests

Server-side resources used by Custom Thank You for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0034.66 ▲3.38
Dashboard /wp-admin3.06 ▼0.0036.19 ▼11.72
Posts /wp-admin/edit.php3.11 ▲0.0034.19 ▼5.78
Add New Post /wp-admin/post-new.php5.42 ▼0.0277.25 ▼590.25
Media Library /wp-admin/upload.php3.00 ▲0.0028.32 ▼0.44

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 4 new options
New WordPress options
ctyw_enable_fb_social_box
ctyw_enable_twitter_social_box
ctyw_enable_pinterest_social_box
ctyw_notice_dismiss

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Thank You for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲1515.71 ▲0.074.77 ▼0.6075.82 ▼1.12
Dashboard /wp-admin2,933 ▲386.19 ▲0.05111.99 ▼14.00169.19 ▼5.77
Posts /wp-admin/edit.php2,740 ▲343.23 ▼0.0262.09 ▼1.34132.15 ▼6.73
Add New Post /wp-admin/post-new.php3,751 ▼5618.81 ▼0.27412.92 ▼23.84161.38 ▼4.34
Media Library /wp-admin/upload.php1,749 ▼35.51 ▲0.00155.38 ▲18.08194.62 ▲8.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 4 options in the database
    • ctyw_enable_pinterest_social_box
    • ctyw_enable_fb_social_box
    • ctyw_enable_twitter_social_box
    • ctyw_notice_dismiss

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
7 plugin tags: checkout, receipt, social share, redirect, invoice...

custom-thank-you-for-woocommerce/custom-thank-you-for-woocommerce.php 85% from 13 tests

The principal PHP file in "Custom Thank You for WooCommerce" v. 1.0.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.2.0")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,564 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP4191232838
PO File3105114333
CSS1511228
JavaScript33465161
SVG4004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity45.33
▷ Minimum class complexity10.00
▷ Maximum class complexity100.00
Average method complexity5.16
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods32
▷ Static methods412.50%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/prev.png0.82KB0.76KB▼ 6.80%
assets/images/next.png0.80KB0.73KB▼ 7.98%