94% genesis-gtm4wp

Code Review | Genesis Google Tag Manager for Wordpress

WordPress plugin Genesis Google Tag Manager for Wordpress scored 94% from 54 tests.

About plugin

  • Plugin page: genesis-gtm4wp
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.1
  • WordPress version: 5.8.1
  • First release: May 3, 2015
  • Latest release: May 3, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: marioy47 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active / 4,964 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼136.39ms] Passed 4 tests

Analyzing server-side resources used by Genesis Google Tag Manager for Wordpress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1239.22 ▲14.71
Dashboard /wp-admin3.06 ▲0.0057.33 ▲5.45
Posts /wp-admin/edit.php3.11 ▲0.0051.58 ▲6.08
Add New Post /wp-admin/post-new.php5.42 ▼0.0297.52 ▼558.12
Media Library /wp-admin/upload.php3.00 ▲0.0035.31 ▲1.03

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Genesis Google Tag Manager for Wordpress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.81 ▼0.158.08 ▼0.6149.83 ▼2.07
Dashboard /wp-admin2,960 ▲235.87 ▼0.09173.10 ▲6.57124.69 ▲5.37
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0074.07 ▲2.4496.72 ▲3.38
Add New Post /wp-admin/post-new.php1,683 ▼018.85 ▲0.10393.54 ▼2.62115.67 ▼4.34
Media Library /wp-admin/upload.php1,810 ▲35.04 ▲0.04168.45 ▲5.81123.62 ▼8.45

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/genesis-gtm4wp/plugin.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
You can take inspiration from this readme.txt

genesis-gtm4wp/plugin.php 92% from 13 tests

The main PHP file in "Genesis Google Tag Manager for Wordpress" ver. 0.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("genesis-gtm4wp.php" instead of "plugin.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
No dangerous file extensions were detected24 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1142019
Markdown1305

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

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