88% insert-google-analytics-id

Code Review | Insert Google Analytics Id

WordPress plugin Insert Google Analytics Id scored 88% from 54 tests.

About plugin

  • Plugin page: insert-google-ana...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 5.8.1
  • First release: Dec 10, 2016
  • Latest release: Apr 7, 2020
  • Number of updates: 42
  • Update frequency: every 28.9 days
  • Top authors: subhash76 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 12,366 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Insert Google Analytics Id
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0038.25 ▼2.34
Dashboard /wp-admin3.06 ▲0.0151.36 ▼7.00
Posts /wp-admin/edit.php3.11 ▲0.0147.50 ▼3.12
Add New Post /wp-admin/post-new.php5.42 ▼0.0193.49 ▼732.15
Media Library /wp-admin/upload.php3.00 ▲0.0031.55 ▼1.32
Insert Google Analytics Id /wp-admin/options-general.php?page=arvs-unique-identifier2.9732.94

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Insert Google Analytics Id: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11216.05 ▲0.409.84 ▼1.9147.71 ▼2.54
Dashboard /wp-admin2,997 ▲635.98 ▲0.02142.33 ▼8.72127.43 ▼1.00
Posts /wp-admin/edit.php2,744 ▲52.71 ▲0.0069.67 ▲0.3985.63 ▼15.14
Add New Post /wp-admin/post-new.php1,503 ▼18018.48 ▼0.16367.44 ▼42.55115.41 ▲1.03
Media Library /wp-admin/upload.php1,812 ▲25.02 ▲0.02159.64 ▲5.15133.92 ▲7.67
Insert Google Analytics Id /wp-admin/options-general.php?page=arvs-unique-identifier1,0932.0662.6872.35

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
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/insert-google-analytics-id/insert-google-analytics-id.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=arvs-unique-identifier
    • > Network (severe)
    https://aarvis.com/new-logo-3/ - Failed to load resource: net::ERR_CONNECTION_CLOSED

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (The plugin Menu), #2 (Input your Tracking Code)
The official readme.txt is a good inspiration

insert-google-analytics-id/insert-google-analytics-id.php Passed 13 tests

"Insert Google Analytics Id" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
137 characters long description:
This is a simple plugin to insert your Google Analytics Tracking Id. This plugin hooks the analytic code directly to the header section.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin69 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1212269

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.28
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%
Functions3
▷ Named functions3100.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
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png42.10KB20.52KB▼ 51.25%
screenshot-2.png20.74KB10.66KB▼ 48.60%