84% global-site-tag-tracking

Code Review | Global Site Tag Tracking

WordPress plugin Global Site Tag Tracking scored 84% from 54 tests.

About plugin

  • Plugin page: global-site-tag-t...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Oct 27, 2017
  • Latest release: Aug 18, 2023
  • Number of updates: 12
  • Update frequency: every 176.8 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active / 15,195 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Global Site Tag Tracking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.78 ▼15.48
Dashboard /wp-admin3.34 ▲0.0349.15 ▼1.72
Posts /wp-admin/edit.php3.39 ▲0.0348.80 ▲5.57
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.57 ▼3.44
Media Library /wp-admin/upload.php3.26 ▲0.0335.52 ▼1.75
Global Site Tag Tracking /wp-admin/options-general.php?page=global-site-tag-tracking-settings3.2030.87

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Global Site Tag Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.62 ▼0.681.61 ▼0.5340.76 ▼8.49
Dashboard /wp-admin2,207 ▲194.85 ▼1.07111.63 ▼7.5743.44 ▲0.73
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0039.85 ▲4.1434.25 ▲1.64
Add New Post /wp-admin/post-new.php1,541 ▲2723.25 ▼0.21634.23 ▼58.9552.81 ▼5.54
Media Library /wp-admin/upload.php1,386 ▼24.24 ▲0.0196.57 ▼3.9941.90 ▲0.42
Global Site Tag Tracking /wp-admin/options-general.php?page=global-site-tag-tracking-settings7872.0323.4027.50

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=global-site-tag-tracking-settings
    • > Notice in wp-content/plugins/global-site-tag-tracking/main.php+80
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: stats, analytics, google, tracking, google analytics

global-site-tag-tracking/main.php 92% from 13 tests

The main PHP script in "Global Site Tag Tracking" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("global-site-tag-tracking.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin114 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11711114

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin