90% tracking-code-for-google-tag-manager

Code Review | Tracking Code for Google Tag Manager

WordPress plugin Tracking Code for Google Tag Manager scored90%from 54 tests.

About plugin

  • Plugin page: tracking-code-for...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6.0
  • WordPress version: 6.3.1
  • First release: Nov 28, 2020
  • Latest release: Nov 28, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: claytoncollie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /586 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.00MB] [CPU: ▼6.82ms] Passed 4 tests

Server-side resources used by Tracking Code for Google Tag Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0134.04 ▼3.36
Dashboard /wp-admin3.31 ▼0.0343.33 ▼17.87
Posts /wp-admin/edit.php3.36 ▲0.0147.93 ▲2.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.26 ▼4.89
Media Library /wp-admin/upload.php3.24 ▲0.0133.12 ▼1.15

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tracking Code for Google Tag Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.78 ▲0.121.59 ▼0.0639.44 ▼4.02
Dashboard /wp-admin2,206 ▲265.86 ▲0.9193.30 ▼16.7838.28 ▼11.47
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0238.39 ▲2.7634.41 ▼0.61
Add New Post /wp-admin/post-new.php1,547 ▲3318.18 ▲0.55596.02 ▼20.5067.41 ▲9.73
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.1498.48 ▼8.5544.07 ▲1.35

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

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: tracking code, google tag manager, google, tag manager, container...

tracking-code-for-google-tag-manager/tracking-code-for-google-tag-manager.php Passed 13 tests

The principal PHP file in "Tracking Code for Google Tag Manager" v. 1.0.0 is loaded by WordPress automatically on each request
81 characters long description:
Simple, lightweight solution for inserting your Google Tag Manager tracking code.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected108 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3146793
Markdown212015

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions4
▷ Named functions4100.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