89% dd-gtag-event-tracking

Code Review | Analytics Event Tracking for GTAG

WordPress plugin Analytics Event Tracking for GTAG scored89%from 54 tests.

About plugin

  • Plugin page: dd-gtag-event-tra...
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4
  • WordPress version: 6.3.1
  • First release: Sep 6, 2018
  • Latest release: Jul 1, 2020
  • Number of updates: 7
  • Update frequency: every 94.9 days
  • Top authors: thehowarde (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /944 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.04MB] [CPU: ▼2.50ms] Passed 4 tests

Server-side resources used by Analytics Event Tracking for GTAG
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.71 ▼1.11
Dashboard /wp-admin3.35 ▲0.0445.70 ▼5.24
Posts /wp-admin/edit.php3.40 ▲0.0449.29 ▼2.34
Add New Post /wp-admin/post-new.php5.96 ▲0.0895.21 ▼1.32
Media Library /wp-admin/upload.php3.27 ▲0.0435.28 ▲3.37
GTAG Event Options /wp-admin/options-general.php?page=dd-gtag-options3.2431.34

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Analytics Event Tracking for GTAG
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲17913.61 ▼0.785.23 ▲3.1941.02 ▼11.63
Dashboard /wp-admin2,214 ▲265.84 ▲0.9793.97 ▼23.0238.68 ▼5.28
Posts /wp-admin/edit.php2,097 ▲82.05 ▲0.0339.89 ▲2.9235.74 ▲1.91
Add New Post /wp-admin/post-new.php1,537 ▲1723.40 ▲0.24653.96 ▼56.1861.40 ▲3.46
Media Library /wp-admin/upload.php1,396 ▲84.30 ▲0.1995.96 ▼18.5541.13 ▼6.96
GTAG Event Options /wp-admin/options-general.php?page=dd-gtag-options7962.0624.3325.32

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
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: gtag, google analytics, events, analytics events

dd-gtag-event-tracking/gtag-event-tracking.php 77% from 13 tests

This is the main PHP file of "Analytics Event Tracking for GTAG" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "5.6")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dd-gtag-event-tracking.php" instead of "gtag-event-tracking.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin273 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP44835140
JavaScript544120
CSS235113

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin