84% cf7-utm-tracking

Code Review | UTM tags + Landing page + "gclid" tracking for Contact Form 7

WordPress plugin UTM tags + Landing page + "gclid" tracking for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: cf7-utm-tracking
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 25, 2017
  • Latest release: Aug 17, 2019
  • Number of updates: 9
  • Update frequency: every 93.4 days
  • Top authors: kaminsky.m (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,436 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.80ms] Passed 4 tests

A check of server-side resources used by UTM tags + Landing page + "gclid" tracking for Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0543.80 ▼4.56
Dashboard /wp-admin3.35 ▲0.0550.66 ▼1.26
Posts /wp-admin/edit.php3.47 ▲0.1150.13 ▼6.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0591.01 ▼6.85
Media Library /wp-admin/upload.php3.28 ▲0.0539.51 ▲3.40
CF7 UTM tracking /wp-admin/admin.php?page=cf7-utm-tracking3.2435.63

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

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

Browser metrics Passed 4 tests

A check of browser resources used by UTM tags + Landing page + "gclid" tracking for Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.76 ▲0.385.01 ▲3.1838.45 ▼8.95
Dashboard /wp-admin2,226 ▲264.85 ▼1.03115.20 ▼6.3448.28 ▲1.14
Posts /wp-admin/edit.php2,114 ▲142.06 ▲0.0837.73 ▼4.0139.15 ▲5.81
Add New Post /wp-admin/post-new.php1,565 ▲3418.57 ▼4.64616.74 ▲9.6277.72 ▲17.95
Media Library /wp-admin/upload.php1,408 ▲84.26 ▲0.1399.86 ▼18.7652.26 ▲3.44
CF7 UTM tracking /wp-admin/admin.php?page=cf7-utm-tracking8672.0225.6628.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'CF7_UTM_Tracking' not found in wp-content/plugins/cf7-utm-tracking/templates/admin.php:4

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: utm-tracking, contact-form-7, cf7, utm

cf7-utm-tracking/cf7-utm-tracking.php 92% from 13 tests

"UTM tags + Landing page + "gclid" tracking for Contact Form 7" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin470 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP47163254
JavaScript33978216

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.50
▷ Minimum class complexity4.00
▷ Maximum class complexity35.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods1164.71%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
cf7utm-logo.png8.42KB4.15KB▼ 50.75%