84% microsoft-advertising-universal-event-tracking-uet

Code Review | Microsoft Advertising Universal Event Tracking (UET)

WordPress plugin Microsoft Advertising Universal Event Tracking (UET) scored 84% from 54 tests.

About plugin

  • Plugin page: microsoft-adverti...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.0
  • WordPress version: 6.3.1
  • First release: Mar 11, 2021
  • Latest release: Apr 7, 2023
  • Number of updates: 11
  • Update frequency: every 68.9 days
  • Top authors: microsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active / 20,057 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼3.02ms] Passed 4 tests

Analyzing server-side resources used by Microsoft Advertising Universal Event Tracking (UET)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.16 ▼2.56
Dashboard /wp-admin3.34 ▲0.0345.23 ▼4.94
Posts /wp-admin/edit.php3.39 ▲0.0349.60 ▲0.16
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.75 ▼4.72
Media Library /wp-admin/upload.php3.26 ▲0.0333.83 ▲1.43
UET tag /wp-admin/options-general.php?page=uet_tag_settings_page3.2329.70

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Microsoft Advertising Universal Event Tracking (UET)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.16 ▼1.241.93 ▲0.0638.71 ▼7.19
Dashboard /wp-admin2,221 ▲365.84 ▼0.04105.48 ▲4.3838.25 ▼7.02
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0235.98 ▼3.6231.60 ▼3.13
Add New Post /wp-admin/post-new.php1,537 ▲423.20 ▲0.22665.55 ▲15.8969.75 ▲17.59
Media Library /wp-admin/upload.php1,386 ▼24.21 ▲0.0494.46 ▼10.8640.74 ▼2.24
UET tag /wp-admin/options-general.php?page=uet_tag_settings_page7902.0325.2931.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/microsoft-advertising-universal-event-tracking-uet/wp-uet-plugin.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: uet, advertising, microsoft advertising, microsoft, bing ads...

microsoft-advertising-universal-event-tracking-uet/wp-uet-plugin.php 92% from 13 tests

The primary PHP file in "Microsoft Advertising Universal Event Tracking (UET)" version 1.0.5 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("microsoft-advertising-universal-event-tracking-uet.php" instead of "wp-uet-plugin.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
There were no executable files found in this plugin160 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32318160

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.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
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
No PNG images were found in this plugin