78% sv-tracking-manager

Code Review | SV Tracking Manager

WordPress plugin SV Tracking Manager scored 78% from 54 tests.

About plugin

  • Plugin page: sv-tracking-manager
  • Plugin version: 2.0.00
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 4, 2019
  • Latest release: May 23, 2023
  • Number of updates: 23
  • Update frequency: every 55.0 days
  • Top authors: Matthias Reuter (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 16,985 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲1.42MB] [CPU: ▲10.31ms] Passed 4 tests

Analyzing server-side resources used by SV Tracking Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.66 ▲1.2043.89 ▲7.24
Dashboard /wp-admin4.79 ▲1.4856.03 ▲11.04
Posts /wp-admin/edit.php4.90 ▲1.5558.01 ▲11.03
Add New Post /wp-admin/post-new.php7.39 ▲1.5099.72 ▲11.92
Media Library /wp-admin/upload.php4.71 ▲1.4845.80 ▲13.65
Info /wp-admin/admin.php?page=straightvisions4.7944.60
SV Tracking Manager /wp-admin/admin.php?page=sv_tracking_manager4.7445.55

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 199 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
sv_tracking_manager_scripts_settings_sv_core_color_picker_attached
sv_tracking_manager_scripts_settings_flush_css_cache
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for SV Tracking Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲17013.63 ▲0.314.64 ▲2.9638.56 ▼3.40
Dashboard /wp-admin2,341 ▲1355.79 ▼0.0698.82 ▲0.8891.28 ▲50.14
Posts /wp-admin/edit.php2,224 ▲1382.04 ▼0.0134.31 ▲0.4129.07 ▼6.33
Add New Post /wp-admin/post-new.php1,666 ▲15218.67 ▲0.98677.19 ▲22.8741.56 ▼16.03
Media Library /wp-admin/upload.php1,520 ▲1354.22 ▼0.02100.00 ▼2.8280.24 ▲35.40
Info /wp-admin/admin.php?page=straightvisions1,57210.63199.80131.52
SV Tracking Manager /wp-admin/admin.php?page=sv_tracking_manager1,58510.6577.90139.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 8 options in the database
    • sv_tracking_manager_scripts_settings_sv_core_color_picker_attached
    • theysaidso_admin_options
    • db_upgraded
    • sv_tracking_manager_scripts_settings_flush_css_cache
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/tpl/setting_checkbox_field.php
  • 256× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/tpl/setting_checkbox_field.php on line 14
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/tpl/setting_margin_field.php on line 20
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/tpl/setting_time.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sv-tracking-manager/lib/modules/usercentrics/lib/backend/tpl/subpage_advanced.php:2
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/tpl/setting_textarea.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'sv_core\\settings' not found in wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/modules/setting_number/setting_number.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/tpl/setting_url.php on line 5
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/tpl/setting_id.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/tpl/setting_upload.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sv-tracking-manager/lib/core_plugin/core/settings/tpl/setting_border_tpl/border_width.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
Please take inspiration from this readme.txt

sv-tracking-manager/sv_tracking_manager.php 85% from 13 tests

The primary PHP file in "SV Tracking Manager" version 2.0.00 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sv-tracking-manager.php" instead of "sv_tracking_manager.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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 plugin11,516 lines of code in 173 files:
LanguageFilesBlank linesComment linesLines of code
PHP1121,2221,5456,362
CSS29288892,841
PO File2442641916
JavaScript2620291810
SVG200585
Markdown2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity16.96
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes51
▷ Abstract classes11.96%
▷ Concrete classes5098.04%
▷ Final classes00.00%
Methods535
▷ Static methods81.50%
▷ Public methods46186.17%
▷ Protected methods519.53%
▷ Private methods234.30%
Functions24
▷ Named functions00.00%
▷ Anonymous functions24100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin