83% wc-custom-thank-you

Code Review | WC Custom Thank You

WordPress plugin WC Custom Thank You scored83%from 54 tests.

About plugin

  • Plugin page: wc-custom-thank-you
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Aug 17, 2015
  • Latest release: Jul 19, 2018
  • Number of updates: 9
  • Update frequency: every 119.0 days
  • Top authors: nicolamustone (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100,000+ active /40,488 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.93ms] Passed 4 tests

An overview of server-side resources used by WC Custom Thank You
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.81 ▼3.12
Dashboard /wp-admin3.35 ▲0.0048.41 ▼16.14
Posts /wp-admin/edit.php3.46 ▲0.1049.23 ▲0.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.18 ▼4.72
Media Library /wp-admin/upload.php3.27 ▲0.0444.97 ▲7.76

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WC Custom Thank You
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.69 ▲0.331.82 ▼0.2543.43 ▼0.20
Dashboard /wp-admin2,203 ▲295.58 ▼0.0182.95 ▼5.1144.25 ▼0.62
Posts /wp-admin/edit.php2,106 ▲62.01 ▼0.0240.76 ▲4.4035.08 ▼3.12
Add New Post /wp-admin/post-new.php1,531 ▲322.91 ▼0.17658.13 ▼25.9756.72 ▲2.53
Media Library /wp-admin/upload.php1,402 ▲24.23 ▲0.04109.58 ▲12.2947.60 ▲1.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wc-custom-thank-you/woo-includes/woo-functions.php:58

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 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

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

The principal PHP file in "WC Custom Thank You" v. 1.2.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-custom-thank-you.php" instead of "woocommerce-custom-thankyou.php")

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
Success! There were no dangerous files found in this plugin345 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP366131182
PO File1304674
JavaScript193860
JSON10024
XML1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity6.33
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods323.08%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin