84% zillametrics-google-tag-manager

Code Review | Google Tag Manager

WordPress plugin Google Tag Manager scored84%from 54 tests.

About plugin

  • Plugin page: zillametrics-goog...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2022
  • Latest release: Feb 27, 2022
  • Number of updates: 4
  • Update frequency: every 353.3 days
  • Top authors: zillametrics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /1,232 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.89ms] Passed 4 tests

Server-side resources used by Google Tag Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.09 ▲1.93
Dashboard /wp-admin3.32 ▲0.0243.89 ▼6.43
Posts /wp-admin/edit.php3.37 ▲0.0248.27 ▲9.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.52 ▼14.88
Media Library /wp-admin/upload.php3.25 ▲0.0235.54 ▼0.16
Google Tag Manager /wp-admin/options-general.php?page=gotama-settings3.2130.50

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Google Tag Manager: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.21 ▼0.321.78 ▼0.0641.25 ▼1.61
Dashboard /wp-admin2,196 ▲225.61 ▼0.0684.78 ▼16.3235.87 ▼7.59
Posts /wp-admin/edit.php2,104 ▲12.04 ▲0.0637.66 ▼3.4835.53 ▲1.58
Add New Post /wp-admin/post-new.php1,529 ▼623.86 ▲5.29678.89 ▲22.2459.22 ▼9.09
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.0398.55 ▼14.0844.42 ▼4.72
Google Tag Manager /wp-admin/options-general.php?page=gotama-settings7932.0326.0725.42

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/zillametrics-google-tag-manager/basic-google-tag-manager.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
1 plugin tags: google tag manager

zillametrics-google-tag-manager/basic-google-tag-manager.php 85% from 13 tests

The primary PHP file in "Google Tag Manager" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("zillametrics-google-tag-manager.php" instead of "basic-google-tag-manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1123065

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin