78% its-tracking-code

Code Review | IT's Tracking Code

WordPress plugin IT's Tracking Code scored78%from 54 tests.

About plugin

  • Plugin page: its-tracking-code
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Jun 22, 2023
  • Number of updates: 11
  • Update frequency: every 280.6 days
  • Top authors: kprajapati22 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,546 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.89ms] Passed 4 tests

Analyzing server-side resources used by IT's Tracking Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.93 ▼0.36
Dashboard /wp-admin3.32 ▼0.0247.73 ▼12.76
Posts /wp-admin/edit.php3.37 ▲0.0246.51 ▲2.48
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.65 ▼20.90
Media Library /wp-admin/upload.php3.25 ▲0.0235.25 ▲3.57
Tracking Code /wp-admin/options-general.php?page=tracking-code3.2229.83

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for IT's Tracking Code
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.29 ▼1.092.27 ▲0.4548.97 ▲6.19
Dashboard /wp-admin2,210 ▲225.80 ▼0.11119.23 ▲13.7153.77 ▲12.47
Posts /wp-admin/edit.php2,090 ▼22.00 ▼0.0133.09 ▼8.1631.52 ▼6.46
Add New Post /wp-admin/post-new.php1,542 ▲2318.31 ▼4.77631.63 ▼16.3454.05 ▼5.73
Media Library /wp-admin/upload.php1,386 ▼24.20 ▼0.1196.09 ▼3.3243.48 ▼1.51
Tracking Code /wp-admin/options-general.php?page=tracking-code8262.0527.7629.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tracking-code
    • > Notice in wp-content/plugins/its-tracking-code/includes/admin/forms/tracking-code-settings.php+46
    Trying to access array offset on value of type bool
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tracking-code
    • > Notice in wp-content/plugins/its-tracking-code/includes/admin/forms/tracking-code-settings.php+46
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function stripslashes_deep() in wp-content/plugins/its-tracking-code/includes/admin/forms/tracking-code-settings.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

its-tracking-code/it-tracking-code.php 85% from 13 tests

The main PHP file in "IT's Tracking Code" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("its-tracking-code.php" instead of "it-tracking-code.php")

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
There were no executable files found in this plugin113 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP437122113

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.40
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 files were detected