78% custom-thank-you-page

Code Review | Custom Thank You Page

WordPress plugin Custom Thank You Page scored 78% from 54 tests.

About plugin

  • Plugin page: custom-thank-you-...
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 11, 2020
  • Latest release: Sep 16, 2023
  • Number of updates: 13
  • Update frequency: every 79.9 days
  • Top authors: alexvtn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 5,466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.06ms] Passed 4 tests

Analyzing server-side resources used by Custom Thank You Page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.84 ▼4.44
Dashboard /wp-admin3.31 ▲0.0048.81 ▲1.07
Posts /wp-admin/edit.php3.36 ▲0.0045.13 ▲1.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.24 ▼22.41
Media Library /wp-admin/upload.php3.23 ▲0.0036.18 ▲4.82
Custom Thank You Page /wp-admin/admin.php?page=ctyp_panel3.0023.39

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Custom Thank You Page: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.24 ▼1.081.75 ▼0.2043.32 ▼6.11
Dashboard /wp-admin2,209 ▲214.87 ▼0.0296.51 ▼14.4340.63 ▼0.45
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0032.93 ▼4.1134.34 ▼3.68
Add New Post /wp-admin/post-new.php1,535 ▲123.22 ▼0.12648.55 ▼9.6753.45 ▼0.07
Media Library /wp-admin/upload.php1,382 ▼94.14 ▼0.1593.24 ▼10.6944.66 ▼0.07
Custom Thank You Page /wp-admin/admin.php?page=ctyp_panel280.440.093.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/custom-thank-you-page/init.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/custom-thank-you-page/core/admin/panel.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-thank-you-page/core/functions/functions.php:204

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=ctyp_panel
    • > Network (severe)
    wp-admin/admin.php?page=ctyp_panel - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Plugin settings.), #2 (Example of the final thank you page.)
You can take inspiration from this readme.txt

custom-thank-you-page/init.php 85% from 13 tests

This is the main PHP file of "Custom Thank You Page" version 1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-thank-you-page.php" instead of "init.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.5.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,313 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP91,0542301,377
CSS510924615
JavaScript5014877216
PO File192181105

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.26
Average class complexity40.20
▷ Minimum class complexity4.00
▷ Maximum class complexity83.00
Average method complexity5.26
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods4597.83%
▷ Protected methods00.00%
▷ Private methods12.17%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants5
▷ Global constants5100.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
5 PNG files occupy 0.06MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/images/subparent.png0.94KB0.11KB▼ 88.00%
screenshot-2.png23.30KB9.16KB▼ 60.69%
screenshot-1.png40.25KB15.72KB▼ 60.94%
core/assets/images/subparent-hover.png0.93KB0.11KB▼ 88.29%
core/assets/images/icon.png1.13KB0.45KB▼ 60.38%