10% wp-google-tag-manager

Code Review | WP Google Tag Manager

WordPress plugin WP Google Tag Manager scored 10% from 54 tests.

About plugin

  • Plugin page: wp-google-tag-man...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 5.9.2
  • First release: Oct 8, 2012
  • Latest release: Jan 10, 2013
  • Number of updates: 6
  • Update frequency: every 15.8 days
  • Top authors: conlabzgmbh (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 15,938 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wp-google-tag-manager/wp-google-tag-manager.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; WpGoogleTagManager has a deprecated constructor

Server metrics [RAM: ▼2.48MB] [CPU: ▼357.01ms] Passed 4 tests

Server-side resources used by WP Google Tag Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼1.624.62 ▼47.86
Dashboard /wp-admin1.91 ▼1.503.43 ▼29.52
Posts /wp-admin/edit.php1.91 ▼1.734.29 ▼34.51
Add New Post /wp-admin/post-new.php1.91 ▼5.064.65 ▼1,316.15
Media Library /wp-admin/upload.php1.91 ▼1.383.52 ▼19.73
WP Google Tag Manager /wp-admin/options-general.php?page=wp_google_tag_manager1.914.82

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Google Tag Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,830 ▲7615.66 ▲0.086.20 ▲0.143.28 ▲0.69
Dashboard /wp-admin2,908 ▲506.11 ▼0.07119.72 ▼18.48158.64 ▼0.18
Posts /wp-admin/edit.php2,706 ▲123.24 ▲0.0066.58 ▲3.84147.07 ▲7.87
Add New Post /wp-admin/post-new.php1,666 ▲516.69 ▲0.30412.89 ▼0.43155.31 ▲1.51
Media Library /wp-admin/upload.php1,713 ▲155.67 ▲0.18142.63 ▼8.35192.65 ▼4.68
WP Google Tag Manager /wp-admin/options-general.php?page=wp_google_tag_manager1,0622.4453.57110.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-google-tag-manager/wp-google-tag-manager.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; WpGoogleTagManager has a deprecated constructor

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_google_tag_manager
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/wp-google-tag-manager/wp-google-tag-manager.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; WpGoogleTagManager has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-google-tag-manager/wp-google-tag-manager.php:57

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
7 plugin tags: code, snippet, manager, google, tagmanager...

wp-google-tag-manager/wp-google-tag-manager.php Passed 13 tests

Analyzing the main PHP file in "WP Google Tag Manager" version 1.1
69 characters long description:
Include code snippets from Google Tag Manager (google.com/tagmanager)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin116 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11981116

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin