57% kawuda-utm-source-tracker

Code Review | Kawuda UTM source tracker

WordPress plugin Kawuda UTM source tracker scored57%from 54 tests.

About plugin

  • Plugin page: kawuda-utm-source...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 20, 2021
  • Latest release: Mar 31, 2023
  • Number of updates: 11
  • Update frequency: every 48.0 days
  • Top authors: wapnishantha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /466 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.08MB] [CPU: ▼23.05ms] Passed 4 tests

Server-side resources used by Kawuda UTM source tracker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1426.94 ▼10.38
Dashboard /wp-admin3.22 ▼0.1227.09 ▼36.80
Posts /wp-admin/edit.php3.36 ▲0.0033.75 ▼11.06
Add New Post /wp-admin/post-new.php5.61 ▼0.2864.57 ▼33.96
Media Library /wp-admin/upload.php3.31 ▲0.0830.09 ▼2.44
Dashboard /wp-admin/admin.php?page=kawuda_options3.2126.89
Setting /wp-admin/admin.php?page=kawuda_setting3.2129.11

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: 2 new tables, 6 new options
New tables
wp_kawuda_link
wp_kawuda_user
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kawuda UTM source tracker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.39 ▲0.192.18 ▲0.5444.13 ▼1.02
Dashboard /wp-admin2,215 ▲415.69 ▲0.1988.20 ▼3.4988.95 ▲49.38
Posts /wp-admin/edit.php2,135 ▲352.00 ▲0.0134.72 ▼1.5332.71 ▼4.34
Add New Post /wp-admin/post-new.php1,710 ▲18422.48 ▼0.76688.76 ▲16.1351.94 ▲2.78
Media Library /wp-admin/upload.php1,429 ▲294.12 ▼0.0897.21 ▲3.7968.83 ▲25.94
Dashboard /wp-admin/admin.php?page=kawuda_options1,0782.1934.5330.15
Setting /wp-admin/admin.php?page=kawuda_setting8701.6625.2723.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/controllers/class-kawudas-tracking.php+28
    Undefined index: kawuda_cookie
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kawuda_setting
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/controllers/class-kawudas-tracking.php+183
    Undefined index: HTTP_SEC_CH_UA_PLATFORM
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kawuda_setting
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/controllers/class-kawudas-tracking.php+184
    Undefined index: HTTP_SEC_CH_UA_MOBILE
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kawuda_setting
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/controllers/class-kawudas-tracking.php+185
    Undefined index: HTTP_REFERER
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kawuda_setting
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/controllers/class-kawudas-tracking.php+186
    Undefined index: HTTP_SEC_CH_UA
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kawuda_options
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/models/class-kawuda-tracking.php+191
    Undefined index: fromDate
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kawuda_options
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/models/class-kawuda-tracking.php+192
    Undefined index: toDate
    • > GET request to /wp-admin/admin.php?page=kawuda_options
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/views/dashboard-view-admin.php+85
    Undefined variable: fromDate
    • > GET request to /wp-admin/admin.php?page=kawuda_options
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/views/dashboard-view-admin.php+90
    Undefined variable: toDate
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kawuda_options
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/models/class-kawuda-tracking.php+61
    Undefined variable: newStatTbl
    • > GET request to /wp-admin/admin.php?page=kawuda_options
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/models/class-kawuda-tracking.php+32
    Undefined index: kawuda_id
    • > GET request to /wp-admin/admin.php?page=kawuda_options
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/kawuda-utm-source-tracker/models/class-kawuda-tracking.php+34
    Undefined variable: id

SRP 0% 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/kawuda-utm-source-tracker/deactivate.php
    • > /wp-content/plugins/kawuda-utm-source-tracker/activate.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/kawuda-utm-source-tracker/kawuda.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=kawuda_setting
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).datepicker is not a function" "TypeError: jQuery(...).datepicker is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/kawuda-utm-source-tracker/assets/js/common.js?ver=0.1.0:2:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=kawuda_setting
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).datepicker is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: utm codes, analytic, tracker, utm tracking, gclid...

kawuda-utm-source-tracker/kawuda.php 92% from 13 tests

Analyzing the main PHP file in "Kawuda UTM source tracker" version 1.4.1
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("kawuda-utm-source-tracker.php" instead of "kawuda.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,736 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP9291911,116
JavaScript36340310
CSS2668272
Markdown125038

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity39.33
▷ Minimum class complexity4.00
▷ Maximum class complexity79.00
Average method complexity5.42
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png1.19KB0.23KB▼ 81.03%
assets/icon-128x128.png5.90KB2.66KB▼ 54.87%
assets/banner-772x250.png118.48KB55.62KB▼ 53.06%