79% simple-google-analytics-tracking

Code Review | Simple Google Analytics Tracking

WordPress plugin Simple Google Analytics Tracking scored 79% from 54 tests.

About plugin

  • Plugin page: simple-google-ana...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.3
  • WordPress version: 6.3.1
  • First release: Feb 24, 2015
  • Latest release: Apr 20, 2017
  • Number of updates: 8
  • Update frequency: every 98.2 days
  • Top authors: dustyn (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active / 17,646 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.85ms] Passed 4 tests

Analyzing server-side resources used by Simple Google Analytics Tracking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.67 ▼2.93
Dashboard /wp-admin3.31 ▲0.0147.95 ▼4.22
Posts /wp-admin/edit.php3.36 ▲0.0145.86 ▲0.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.38 ▼0.69
Media Library /wp-admin/upload.php3.24 ▲0.0134.12 ▲0.46

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Simple Google Analytics Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.20 ▼1.101.69 ▼0.1841.60 ▼3.42
Dashboard /wp-admin2,213 ▲254.85 ▼0.0696.42 ▼17.7538.52 ▼8.99
Posts /wp-admin/edit.php2,096 ▲42.02 ▲0.0547.78 ▲6.1738.71 ▲2.05
Add New Post /wp-admin/post-new.php1,536 ▼623.31 ▲4.96650.89 ▲26.0257.92 ▲5.41
Media Library /wp-admin/upload.php1,389 ▲14.12 ▼0.10100.93 ▲1.7744.01 ▼1.53
Google Analytics /wp-admin/simple-google-analytics-tracking.php260.440.1214.21

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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-google-analytics-tracking/includes/simple-ga-tracking-input.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-google-analytics-tracking/simple-google-analytics-tracking.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-google-analytics-tracking/includes/simple-ga-tracking-output.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/simple-google-analytics-tracking.php
    • > Network (severe)
    wp-admin/simple-google-analytics-tracking.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

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
10 plugin tags: google analytics, google, simple google analytics tracking, tracking, simple google analytics...

simple-google-analytics-tracking/simple-google-analytics-tracking.php Passed 13 tests

The entry point to "Simple Google Analytics Tracking" version 1.3 is a PHP file that has certain tags in its header comment area
72 characters long description:
Add Google Analytics Tracking to your site easily with your Tracking ID.

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
Everything looks great! No dangerous files found in this plugin100 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP53643100

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin