83% custom-thank-you-page-per-product-for-wc

Code Review | Custom Thank You Page Per Product for WC

WordPress plugin Custom Thank You Page Per Product for WC scored83%from 54 tests.

About plugin

  • Plugin page: custom-thank-you-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Nov 18, 2016
  • Latest release: Nov 23, 2016
  • Number of updates: 10
  • Update frequency: every 12.7 days
  • Top authors: masterdaak (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /1,802 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.02MB] [CPU: ▼4.51ms] Passed 4 tests

An overview of server-side resources used by Custom Thank You Page Per Product for WC
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.69 ▼5.11
Dashboard /wp-admin3.33 ▲0.0244.37 ▼5.48
Posts /wp-admin/edit.php3.38 ▲0.0247.10 ▼3.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.81 ▼4.31
Media Library /wp-admin/upload.php3.25 ▲0.0234.67 ▲2.78

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Thank You Page Per Product for WC
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▲0.301.66 ▼0.3447.70 ▲5.42
Dashboard /wp-admin2,206 ▲185.91 ▲0.74104.88 ▼5.6338.72 ▲1.89
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0240.66 ▼2.7834.09 ▼2.30
Add New Post /wp-admin/post-new.php1,538 ▲2423.33 ▲5.64587.71 ▼26.5559.74 ▲1.82
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0496.58 ▼2.0140.74 ▼5.30

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WCCustomThankYouPage\\add_action() in wp-content/plugins/custom-thank-you-page-per-product-for-wc/inc/thank-you.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

custom-thank-you-page-per-product-for-wc/index.php 85% from 13 tests

The entry point to "Custom Thank You Page Per Product for WC" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-thank-you-page-per-product-for-wc.php" instead of "index.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected67 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2214767

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin