94% terribletracker

Code Review | Terribletracker - Google Analytics tracking

WordPress plugin Terribletracker - Google Analytics tracking scored 94% from 54 tests.

About plugin

  • Plugin page: terribletracker
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.4.1
  • WordPress version: 5.8.1
  • First release: May 8, 2019
  • Latest release: Jun 5, 2020
  • Number of updates: 10
  • Update frequency: every 39.6 days
  • Top authors: terribletraffic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 444 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Terribletracker - Google Analytics tracking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.68 ▼0.0421.80 ▲2.89
Dashboard /wp-admin3.08 ▲0.0356.77 ▲12.14
Posts /wp-admin/edit.php3.13 ▲0.0346.02 ▼0.82
Add New Post /wp-admin/post-new.php5.44 ▲0.0094.01 ▼568.47
Media Library /wp-admin/upload.php3.02 ▲0.0236.68 ▲5.33

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Terribletracker - Google Analytics tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,728 ▲13216.01 ▲0.1016.95 ▲7.9452.43 ▼2.25
Dashboard /wp-admin2,987 ▲575.90 ▼0.02142.45 ▼21.42118.05 ▼9.91
Posts /wp-admin/edit.php2,753 ▲142.68 ▼0.1466.48 ▼4.91101.99 ▲9.12
Add New Post /wp-admin/post-new.php1,512 ▼17118.37 ▼0.46382.60 ▲2.9995.15 ▼22.59
Media Library /wp-admin/upload.php1,827 ▲235.02 ▲0.02147.25 ▼10.50122.79 ▲5.57

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 completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/terribletracker/tracking.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/terribletracker/terribletracker.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: google, analytics, site speed, google analytics, tracking

terribletracker/terribletracker.php 85% from 13 tests

The main file in "Terribletracker - Google Analytics tracking" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 174 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin208 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP25540111
CSS113144
SVG10037
JavaScript16016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ga_icon.png2.02KB1.87KB▼ 7.48%
assets/images/icon.png24.85KB11.66KB▼ 53.09%