83% custom-thank-you-pages-for-woocommerce

Code Review | Custom Thank You Pages PRO for WooCommerce

WordPress plugin Custom Thank You Pages PRO for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: custom-thank-you-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 26, 2022
  • Latest release: Jul 26, 2022
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: bogdanfix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /654 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.97ms] Passed 4 tests

An overview of server-side resources used by Custom Thank You Pages PRO for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.18 ▼0.06
Dashboard /wp-admin3.38 ▲0.0849.19 ▼1.72
Posts /wp-admin/edit.php3.43 ▲0.0848.57 ▼2.28
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.86 ▼3.80
Media Library /wp-admin/upload.php3.31 ▲0.0838.79 ▲0.51

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Custom Thank You Pages PRO for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.152.05 ▲0.3942.82 ▼4.59
Dashboard /wp-admin2,198 ▲245.56 ▼0.1289.83 ▼0.5137.40 ▼6.20
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0737.33 ▼2.2633.84 ▼3.82
Add New Post /wp-admin/post-new.php1,536 ▲823.36 ▲0.25704.09 ▲4.7757.03 ▼7.07
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.1794.88 ▼17.4241.57 ▼4.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-thank-you-pages-for-woocommerce/wc-custom-thank-you-pages-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/custom-thank-you-pages-for-woocommerce/wc-custom-thank-you-pages.php:22

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 on the user side

Optimizations

Plugin configuration 86% 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
6 plugin tags: custom, thank you, woocommerce, page, ty page...

custom-thank-you-pages-for-woocommerce/wc-custom-thank-you-pages.php 69% from 13 tests

The main file in "Custom Thank You Pages PRO for WooCommerce" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-thank-you-pages-for-woocommerce.php" instead of "wc-custom-thank-you-pages.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 168 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected5,519 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,2683274,844
PHP2185132614
CSS20161

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/OCU_300x250.png57.62KB19.19KB▼ 66.70%
assets/images/HCC_300x250.png57.75KB20.70KB▼ 64.16%