84% analytics-tracker

Code Review | Analytics Tracker

WordPress plugin Analytics Tracker scored84%from 54 tests.

About plugin

  • Plugin page: analytics-tracker
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Feb 12, 2016
  • Latest release: May 18, 2018
  • Number of updates: 21
  • Update frequency: every 39.4 days
  • Top authors: valeriutihai (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /33,765 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼8.85ms] Passed 4 tests

Analyzing server-side resources used by Analytics Tracker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0426.67 ▼16.23
Dashboard /wp-admin3.45 ▲0.1560.20 ▲9.21
Posts /wp-admin/edit.php3.57 ▲0.2146.62 ▼4.77
Add New Post /wp-admin/post-new.php6.03 ▲0.1482.07 ▼12.22
Media Library /wp-admin/upload.php3.38 ▲0.1535.86 ▼2.19
Other Products /wp-admin/admin.php?page=analyticstracker-other-plugins3.3431.47
Google Analytics /wp-admin/admin.php?page=analyticstracker-menu3.3429.02

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Analytics Tracker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.78 ▲0.191.81 ▼0.4044.56 ▼4.55
Dashboard /wp-admin2,233 ▲424.84 ▼1.04110.36 ▲5.8840.42 ▼3.09
Posts /wp-admin/edit.php2,116 ▲241.99 ▼0.0939.95 ▲0.6033.90 ▲0.25
Add New Post /wp-admin/post-new.php1,563 ▲2918.40 ▼4.80624.99 ▼46.8551.95 ▲1.41
Media Library /wp-admin/upload.php1,418 ▲334.26 ▲0.0794.40 ▼20.5141.03 ▼3.83
Other Products /wp-admin/admin.php?page=analyticstracker-other-plugins9242.2329.7742.84
Google Analytics /wp-admin/admin.php?page=analyticstracker-menu9402.0322.6528.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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)
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/analytics-tracker/analytics-tracker.php

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 issues were found


Plugin configuration Passed 29 tests

readme.txt Passed 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
9 plugin tags: gtagjs, ua code, web stats, wordpress google analytics, tracking code...

analytics-tracker/analytics-tracker.php Passed 13 tests

"Analytics Tracker" version 2.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
88 characters long description:
Analytics Tracker makes it super easy to add Google Analytics tracking code on your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,829 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PO File153110125
Bourne Shell1002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity82.00
▷ Minimum class complexity82.00
▷ Maximum class complexity82.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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