83% utm-url-builder-ga4

Code Review | UTM - URL Builder for GA4

WordPress plugin UTM - URL Builder for GA4 scored83%from 54 tests.

About plugin

  • Plugin page: utm-url-builder-ga4
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 24, 2022
  • Latest release: Oct 3, 2022
  • Number of updates: 17
  • Update frequency: every 0.7 days
  • Top authors: reallygooddata (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /497 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by UTM - URL Builder for GA4
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.77 ▼0.90
Dashboard /wp-admin3.35 ▲0.0044.15 ▼18.42
Posts /wp-admin/edit.php3.40 ▲0.0451.11 ▲4.55
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.05 ▼8.47
Media Library /wp-admin/upload.php3.27 ▲0.0436.63 ▼0.65

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

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

Browser metrics Passed 4 tests

A check of browser resources used by UTM - URL Builder for GA4
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.36 ▼1.025.28 ▲3.3543.37 ▲1.29
Dashboard /wp-admin2,206 ▲154.91 ▼0.16111.67 ▼11.5538.92 ▼8.66
Posts /wp-admin/edit.php2,089 ▲32.02 ▼0.0039.71 ▲4.5934.82 ▼1.41
Add New Post /wp-admin/post-new.php1,514 ▼017.86 ▲0.44687.82 ▲1.0360.06 ▲4.28
Media Library /wp-admin/upload.php1,391 ▲34.27 ▲0.0896.24 ▼3.4044.10 ▼1.83

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/utm-url-builder-ga4/ga4-url-builder.php:24

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 Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: ga4 url builder, google analytics utm builder, google analytics url builder, ga4 utm builder

utm-url-builder-ga4/ga4-url-builder.php 77% from 13 tests

The main PHP file in "UTM - URL Builder for GA4" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 185 characters long)
  • 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: It is recommended to name the main PHP file as the plugin slug ("utm-url-builder-ga4.php" instead of "ga4-url-builder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin445 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14016445

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected