94% ga-link-tracker

Code Review | GA Link Tracker

WordPress plugin GA Link Tracker scored 94% from 54 tests.

About plugin

  • Plugin page: ga-link-tracker
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 5.8.1
  • First release: Apr 9, 2013
  • Latest release: Sep 4, 2014
  • Number of updates: 11
  • Update frequency: every 47.0 days
  • Top authors: project107 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 1,641 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by GA Link Tracker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.45 ▲12.91
Dashboard /wp-admin3.06 ▲0.0144.34 ▼1.48
Posts /wp-admin/edit.php3.11 ▲0.0145.34 ▼2.37
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.57 ▼576.18
Media Library /wp-admin/upload.php3.00 ▲0.0032.04 ▲1.75

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GA Link Tracker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8415.78 ▼0.037.13 ▼2.2650.88 ▲0.49
Dashboard /wp-admin2,989 ▲585.90 ▼0.26132.79 ▼11.85104.17 ▼4.11
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0164.98 ▼0.0394.15 ▲2.78
Add New Post /wp-admin/post-new.php1,676 ▲418.83 ▼0.04351.78 ▼12.93106.29 ▼7.40
Media Library /wp-admin/upload.php1,810 ▲35.02 ▲0.03147.82 ▼7.81119.90 ▼1.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ga-link-tracker/GA-Link-Tracker.php:26

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% 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
8 plugin tags: click tracking, link tracker, google analytics, events, link...

ga-link-tracker/GA-Link-Tracker.php 92% from 13 tests

The main PHP file in "GA Link Tracker" ver. 2.2 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 ("ga-link-tracker.php" instead of "GA-Link-Tracker.php")

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
There were no executable files found in this plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP142111

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin