WordPress plugin GTM4WP scored83%from 54 tests.

About plugin

  • Plugin page: duracelltomi-goog...
  • Plugin version: 1.18.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 23, 2013
  • Latest release: Aug 23, 2023
  • Number of updates: 284
  • Update frequency: every 12.8 days
  • Top authors: duracelltomi (100%)

Code review

54 tests

User reviews

143 reviews

Install metrics

700,000+ active /8,310,736 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
Installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼7.51ms] Passed 4 tests

Analyzing server-side resources used by GTM4WP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2538.15 ▼1.79
Dashboard /wp-admin3.81 ▲0.4743.19 ▼15.07
Posts /wp-admin/edit.php3.93 ▲0.5749.91 ▲3.03
Add New Post /wp-admin/post-new.php6.39 ▲0.5178.14 ▼13.58
Media Library /wp-admin/upload.php3.74 ▲0.5135.80 ▲0.41
Google Tag Manager /wp-admin/options-general.php?page=gtm4wp-settings3.7136.80

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 139 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by GTM4WP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9314.26 ▼0.011.74 ▲0.0635.74 ▼7.20
Dashboard /wp-admin2,221 ▲445.65 ▲0.0594.80 ▲8.5944.93 ▲2.11
Posts /wp-admin/edit.php2,123 ▲232.03 ▲0.0742.48 ▲4.6237.23 ▲0.36
Add New Post /wp-admin/post-new.php1,552 ▲2618.29 ▼5.33654.27 ▲48.1971.25 ▲29.32
Media Library /wp-admin/upload.php1,417 ▲144.28 ▲0.0895.97 ▼0.7341.22 ▲0.44
Google Tag Manager /wp-admin/options-general.php?page=gtm4wp-settings2,6991.9036.6351.37

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 77× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WhichBrowser\\Data\\BuildIds' not found in wp-content/plugins/duracelltomi-google-tag-manager/integration/whichbrowser/data/build-android.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WhichBrowser\\Data\\DeviceModels' not found in wp-content/plugins/duracelltomi-google-tag-manager/integration/whichbrowser/data/indices/models-s40.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WhichBrowser\\Data\\DeviceModels' not found in wp-content/plugins/duracelltomi-google-tag-manager/integration/whichbrowser/data/indices/models-tizen.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WhichBrowser\\Data\\DeviceModels' not found in wp-content/plugins/duracelltomi-google-tag-manager/integration/whichbrowser/data/indices/models-palmos.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/duracelltomi-google-tag-manager/integration/amp.php:157
    • > PHP Fatal error
      Trait 'WhichBrowser\\Analyser\\Header\\Useragent\\Os' not found in wp-content/plugins/duracelltomi-google-tag-manager/integration/whichbrowser/src/Analyser/Header/Useragent.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/duracelltomi-google-tag-manager/common/readoptions.php:452
    • > PHP Fatal error
      Uncaught Error: Class 'WhichBrowser\\Constants\\DeviceType' not found in wp-content/plugins/duracelltomi-google-tag-manager/integration/whichbrowser/data/models-android.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WhichBrowser\\Data\\DeviceModels' not found in wp-content/plugins/duracelltomi-google-tag-manager/integration/whichbrowser/data/indices/models-bada.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WhichBrowser\\Data\\DeviceModels' not found in wp-content/plugins/duracelltomi-google-tag-manager/integration/whichbrowser/data/models-s30plus.php:7

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 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can take inspiration from this readme.txt

duracelltomi-google-tag-manager/duracelltomi-google-tag-manager-for-wordpress.php 85% from 13 tests

"GTM4WP" version 1.18.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("duracelltomi-google-tag-manager.php" instead of "duracelltomi-google-tag-manager-for-wordpress.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin59,406 lines of code in 134 files:
LanguageFilesBlank linesComment linesLines of code
PHP1234,7011,87757,519
JavaScript103281331,827
CSS112060

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 107)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity37.79
▷ Minimum class complexity1.00
▷ Maximum class complexity484.00
Average method complexity9.05
▷ Minimum method complexity1.00
▷ Maximum method complexity107.00
Code structure
Namespaces9
Interfaces0
Traits25
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods274
▷ Static methods196.93%
▷ Public methods8731.75%
▷ Protected methods00.00%
▷ Private methods18768.25%
Functions94
▷ Named functions8085.11%
▷ Anonymous functions1414.89%
Constants222
▷ Global constants14766.22%
▷ Class constants7533.78%
▷ Public constants75100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/tag_manager-64.png0.89KB0.46KB▼ 48.47%
admin/images/tag_manager-32.png1.28KB1.38KB0.00%