99% add-tracking-code-to-wc-thank-you-page

Code Review | Add Tracking Code To WC Thank You Page

WordPress plugin Add Tracking Code To WC Thank You Page scored 99% from 54 tests.

About plugin

  • Plugin page: add-tracking-code...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0
  • WordPress version: 5.8.1
  • First release: Feb 13, 2019
  • Latest release: Feb 15, 2019
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: dnyanraja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 444 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Add Tracking Code To WC Thank You Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1227.58 ▲5.12
Dashboard /wp-admin3.06 ▲0.0141.43 ▲4.65
Posts /wp-admin/edit.php3.12 ▲0.0134.79 ▼5.86
Add New Post /wp-admin/post-new.php5.43 ▼0.0088.78 ▼543.38
Media Library /wp-admin/upload.php3.01 ▼0.0025.88 ▼11.74

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Add Tracking Code To WC Thank You Page
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.79 ▲0.187.41 ▼0.6948.48 ▼2.87
Dashboard /wp-admin2,970 ▲396.08 ▲0.15133.79 ▼19.41104.42 ▼20.60
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0165.27 ▲1.6990.44 ▲5.68
Add New Post /wp-admin/post-new.php1,615 ▼5521.83 ▲2.70259.94 ▼109.87107.28 ▼24.36
Media Library /wp-admin/upload.php1,813 ▲35.03 ▲0.04152.69 ▲4.29118.39 ▼10.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #0 is missing in add-tracking-code-to-wc-thank-you-page/assets to your readme.txt
  • Screenshots: Screenshot #1 (This is where you can add the tracking code.) image required
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

add-tracking-code-to-wc-thank-you-page/tracking-code-for-wc-thankyou.php 85% from 13 tests

The primary PHP file in "Add Tracking Code To WC Thank You Page" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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 ("add-tracking-code-to-wc-thank-you-page.php" instead of "tracking-code-for-wc-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
Good job! No executable or dangerous file extensions detected131 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP65762131

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected