83% gtm-server-side

Code Review | GTM Server Side

WordPress plugin GTM Server Side scored83%from 54 tests.

About plugin

  • Plugin page: gtm-server-side
  • Plugin version: 2.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-6.4.0
  • WordPress version: 6.3.1
  • First release: Oct 8, 2020
  • Latest release: Oct 31, 2023
  • Number of updates: 25
  • Update frequency: every 44.7 days
  • Top authors: gtmserver (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /12,707 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼6.15ms] Passed 4 tests

An overview of server-side resources used by GTM Server Side
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3353.86 ▲15.12
Dashboard /wp-admin3.56 ▲0.2252.97 ▼8.83
Posts /wp-admin/edit.php3.61 ▲0.2651.01 ▲1.63
Add New Post /wp-admin/post-new.php6.10 ▲0.2184.51 ▼18.09
Media Library /wp-admin/upload.php3.42 ▲0.1938.63 ▲0.71
GTM Server Side /wp-admin/options-general.php?page=gtm-server-side-admin-settings3.4035.00

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
gtm_server_side_placement
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for GTM Server Side
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲7714.25 ▼0.102.42 ▲0.5647.62 ▲9.47
Dashboard /wp-admin2,202 ▲215.62 ▼0.0890.92 ▼17.1344.98 ▲7.56
Posts /wp-admin/edit.php2,101 ▲42.01 ▼0.0134.35 ▼5.8735.45 ▼2.93
Add New Post /wp-admin/post-new.php1,532 ▲623.37 ▲0.12674.88 ▲71.4764.96 ▲19.27
Media Library /wp-admin/upload.php1,404 ▲44.17 ▲0.0296.63 ▼1.4043.69 ▼0.27
GTM Server Side /wp-admin/options-general.php?page=gtm-server-side-admin-settings9351.9226.1427.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • gtm_server_side_placement
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'GTM_Server_Side_Admin_Settings' not found in wp-content/plugins/gtm-server-side/templates/class-gtm-server-side-admin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === gtm-server-side === )
  • Screenshots: A description for screenshot #3 is missing in gtm-server-side/assets to your readme.txt
You can look at the official readme.txt

gtm-server-side/gtm-server-side.php 92% from 13 tests

Analyzing the main PHP file in "GTM Server Side" version 2.1.9
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 224 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,335 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP243308901,767
JavaScript36357421
PO File14149128
CSS14019

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.33
Average class complexity8.14
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods103
▷ Static methods2524.27%
▷ Public methods8582.52%
▷ Protected methods10.97%
▷ Private methods1716.50%
Functions18
▷ Named functions15.56%
▷ Anonymous functions1794.44%
Constants29
▷ Global constants2586.21%
▷ Class constants413.79%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin