10% utm-generator

Code Review | UTM Code Generator for Google Analytics Tracking URL

WordPress plugin UTM Code Generator for Google Analytics Tracking URL scored 10% from 54 tests.

About plugin

  • Plugin page: utm-generator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: Apr 26, 2017
  • Latest release: Apr 26, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: technoyer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 893 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/utm-generator/includes/functions.php+81
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.67MB] [CPU: ▼50.03ms] Passed 4 tests

Server-side resources used by UTM Code Generator for Google Analytics Tracking URL
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.155.40 ▼33.00
Dashboard /wp-admin2.33 ▼0.978.50 ▼47.21
Posts /wp-admin/edit.php2.33 ▼1.028.11 ▼37.26
Add New Post /wp-admin/post-new.php2.33 ▼3.557.85 ▼79.85
Media Library /wp-admin/upload.php2.33 ▼0.897.09 ▼35.81
Settings /wp-admin/admin.php?page=tch-utm-generator2.336.71
UTM Generator /wp-admin/admin.php?page=tch-utm-generator-buildnew2.336.46

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 21 new options
New WordPress options
technoUTM_analytics_position
technoUTM_item_id
db_upgraded
widget_recent-comments
technoUTM_default_utm_campaign
technoUTM_install_analytics
widget_theysaidso_widget
technoUTM_analytics_id
technoUTM_default_utm_content
technoUTM_enable_adminbar
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for UTM Code Generator for Google Analytics Tracking URL
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11014.47 ▲0.171.73 ▼0.1740.75 ▼0.50
Dashboard /wp-admin2,248 ▲605.85 ▲0.9897.50 ▼8.3979.14 ▲36.38
Posts /wp-admin/edit.php2,137 ▲481.98 ▼0.0338.76 ▲2.4835.98 ▲2.19
Add New Post /wp-admin/post-new.php6,602 ▲5,08823.50 ▲5.96994.74 ▲317.5083.79 ▲30.72
Media Library /wp-admin/upload.php1,427 ▲454.24 ▲0.05111.97 ▲16.8579.65 ▲33.16
Settings /wp-admin/admin.php?page=tch-utm-generator9902.0526.1046.78
UTM Generator /wp-admin/admin.php?page=tch-utm-generator-buildnew1,0432.0224.2649.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/utm-generator/includes/functions.php+81
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin has failed uninstalling correctly, leaving 15 files (0.10MB) in the plugin directory
    • (new file) images/loading.gif
    • (new file) images/lN.jpg
    • (new file) includes/class.technoUTM.install.php
    • (new file) images/external-link-square-16.png
    • (new file) images/emblem-symbolic-link.png
    • (new file) includes/class.technoUTM.main.php
    • (new file) css/dashboard.css
    • (new file) images/external_link.png
    • (new file) images/icon.png
    • (new file) includes/class.technoUTM.utms.php
    • ...
  • Zombie WordPress options were found after uninstall: 22 options
    • widget_recent-posts
    • technoUTM_item_id
    • technoUTM_databse_version
    • db_upgraded
    • technoUTM_default_utm_source
    • widget_recent-comments
    • technoUTM_active_pages
    • widget_theysaidso_widget
    • technoUTM_active_posts
    • technoUTM_default_utm_campaign
    • ...

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tch-utm-generator-buildnew
    • > Deprecated in wp-content/plugins/utm-generator/includes/functions.php+81
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: url tracker, google analytics url builder, utm url builder, google url builder, google campaign builder...

utm-generator/tch-utm-generator.php 92% from 13 tests

The main file in "UTM Code Generator for Google Analytics Tracking URL" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("utm-generator.php" instead of "tch-utm-generator.php")

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
Success! There were no dangerous files found in this plugin1,613 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6162307850
CSS14310763

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity30.00
▷ Minimum class complexity2.00
▷ Maximum class complexity50.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods36
▷ Static methods12.78%
▷ Public methods3597.22%
▷ Protected methods12.78%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/external_link.png1.23KB0.30KB▼ 75.60%
images/emblem-symbolic-link.png0.38KB0.45KB0.00%
images/icon.png0.77KB0.85KB0.00%
images/external-link-square-16.png0.28KB0.31KB0.00%