84% easy-wp-google-tag-manager

Code Review | Easy WP Google Tag Manager

WordPress plugin Easy WP Google Tag Manager scored84%from 54 tests.

About plugin

  • Plugin page: easy-wp-google-ta...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 25, 2020
  • Latest release: Jun 10, 2022
  • Number of updates: 7
  • Update frequency: every 76.0 days
  • Top authors: manishah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,234 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.56ms] Passed 4 tests

A check of server-side resources used by Easy WP Google Tag Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.67 ▼1.39
Dashboard /wp-admin3.33 ▲0.0247.89 ▼4.34
Posts /wp-admin/edit.php3.38 ▲0.0248.23 ▼0.91
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.40 ▲2.46
Media Library /wp-admin/upload.php3.25 ▲0.0232.60 ▼3.61

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Easy WP Google Tag Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.25 ▼0.102.46 ▲0.3947.25 ▲5.28
Dashboard /wp-admin2,198 ▲185.63 ▼0.2293.00 ▲1.3142.68 ▲2.89
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0743.53 ▲1.0439.55 ▼1.46
Add New Post /wp-admin/post-new.php1,526 ▼023.12 ▼0.48650.47 ▲6.7253.47 ▲3.98
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0196.96 ▼10.6346.21 ▼0.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EasyWPGTM\\add_action() in wp-content/plugins/easy-wp-google-tag-manager/gtag.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: google tag manager, gtm

easy-wp-google-tag-manager/gtag.php 92% from 13 tests

The main file in "Easy WP Google Tag Manager" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-wp-google-tag-manager.php" instead of "gtag.php")

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
Everything looks great! No dangerous files found in this plugin86 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2131386

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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
No PNG images were found in this plugin