83% custom-thank-you-page-for-woocommerce-product

Code Review | Custom Thank You Page For Woocommerce

WordPress plugin Custom Thank You Page For Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: custom-thank-you-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Sep 19, 2017
  • Latest release: Oct 1, 2017
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: brainitagency (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.26ms] Passed 4 tests

Analyzing server-side resources used by Custom Thank You Page For Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.99 ▼2.63
Dashboard /wp-admin3.36 ▲0.0152.30 ▼11.34
Posts /wp-admin/edit.php3.41 ▲0.0551.36 ▼0.41
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.88 ▼21.62
Media Library /wp-admin/upload.php3.29 ▲0.0534.50 ▼5.46

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Custom Thank You Page For Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.241.67 ▼0.2941.95 ▼1.81
Dashboard /wp-admin2,195 ▲185.61 ▲0.0383.72 ▼6.1239.12 ▼6.97
Posts /wp-admin/edit.php2,100 ▲32.00 ▲0.0339.79 ▲0.0936.62 ▼1.87
Add New Post /wp-admin/post-new.php1,528 ▼123.13 ▼0.01686.59 ▲9.0753.35 ▼10.31
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0496.61 ▼25.5046.97 ▼1.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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
Even though no errors were found, 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CSCSWooCommerceThankYou\\add_action() in wp-content/plugins/custom-thank-you-page-for-woocommerce-product/inc/custom-thank-you-woocommerce.php:80

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% 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
No tags were found

custom-thank-you-page-for-woocommerce-product/index.php 77% from 13 tests

"Custom Thank You Page For Woocommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-thank-you-page-for-woocommerce-product.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 209 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin208 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24773154
JavaScript1113254

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin