83% weberlo-for-utm-and-ad-tracking

Code Review | Weberlo for UTM and Ad Tracking

WordPress plugin Weberlo for UTM and Ad Tracking scored83%from 54 tests.

About plugin

  • Plugin page: weberlo-for-utm-a...
  • Plugin version: 0.0.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 25, 2022
  • Latest release: Nov 20, 2023
  • Number of updates: 18
  • Update frequency: every 32.5 days
  • Top authors: weberlo (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

40+ active /528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.95ms] Passed 4 tests

A check of server-side resources used by Weberlo for UTM and Ad Tracking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.24 ▲0.62
Dashboard /wp-admin3.34 ▲0.0347.23 ▼4.41
Posts /wp-admin/edit.php3.45 ▲0.0944.28 ▼2.87
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.22 ▼5.12
Media Library /wp-admin/upload.php3.26 ▲0.0337.58 ▲6.48
Weberlo /wp-admin/tools.php?page=weberlo3.2331.04

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Weberlo for UTM and Ad Tracking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3213.13 ▼1.594.33 ▲2.4943.76 ▼0.24
Dashboard /wp-admin2,199 ▲195.62 ▼0.0287.95 ▼8.7841.62 ▼2.91
Posts /wp-admin/edit.php2,104 ▲72.02 ▲0.0536.88 ▼3.0536.47 ▲0.05
Add New Post /wp-admin/post-new.php1,529 ▼123.68 ▲0.55660.80 ▼35.7251.31 ▲1.04
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.0396.18 ▼12.1141.10 ▼3.75
Weberlo /wp-admin/tools.php?page=weberlo8262.1623.4327.62

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WEBERLO_PLUGIN_URL - assumed 'WEBERLO_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/weberlo-for-utm-and-ad-tracking/admin/templates/admin-page.php on line 14
    • > PHP Notice
      Undefined variable: workspace_id_error in wp-content/plugins/weberlo-for-utm-and-ad-tracking/admin/templates/admin-page.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/weberlo-for-utm-and-ad-tracking/admin/templates/admin-page.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/weberlo-for-utm-and-ad-tracking/public/embed-code.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Contributors: Contributors not specified
You can look at the official readme.txt

weberlo-for-utm-and-ad-tracking/weberlo-auto-embed.php 92% from 13 tests

Analyzing the main PHP file in "Weberlo for UTM and Ad Tracking" version 0.0.9
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("weberlo-for-utm-and-ad-tracking.php" instead of "weberlo-auto-embed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin461 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1210719386
CSS112059
JavaScript10016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.83
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods32
▷ Static methods2578.12%
▷ Public methods2784.38%
▷ Protected methods39.38%
▷ Private methods26.25%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 1.02MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/screenshot-3.png267.36KB268.03KB0.00%
.wordpress-org/screenshot-4.png253.56KB250.72KB▼ 1.12%
admin/img/logo-sm.png7.10KB3.36KB▼ 52.70%
.wordpress-org/icon-256x256.png7.33KB3.61KB▼ 50.70%
.wordpress-org/screenshot-1.png277.20KB271.00KB▼ 2.24%