94% advanced-google-universal-analytics

Code Review | Advanced Google Universal Analytics

WordPress plugin Advanced Google Universal Analytics scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-google-u...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.1
  • WordPress version: 5.9.2
  • First release: May 22, 2014
  • Latest release: Apr 26, 2021
  • Number of updates: 22
  • Update frequency: every 115.1 days
  • Top authors: stefanoai (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 6,774 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼300.69ms] Passed 4 tests

Analyzing server-side resources used by Advanced Google Universal Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1458.69 ▲6.65
Dashboard /wp-admin3.50 ▲0.0933.12 ▼0.07
Posts /wp-admin/edit.php3.72 ▲0.0838.24 ▲2.55
Add New Post /wp-admin/post-new.php6.96 ▼0.0192.19 ▼1,205.81
Media Library /wp-admin/upload.php3.37 ▲0.0825.62 ▲0.58
Advanced Google Universal Analytics /wp-admin/options-general.php?page=AI-AdvancedGoogleUniversalAnalytics3.3425.95

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Google Universal Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1015.79 ▲0.215.61 ▼1.192.25 ▼0.49
Dashboard /wp-admin2,897 ▲366.15 ▼0.06133.59 ▲0.12162.28 ▲0.59
Posts /wp-admin/edit.php2,690 ▲23.24 ▼0.1362.27 ▲0.65139.59 ▲1.85
Add New Post /wp-admin/post-new.php1,755 ▲4420.98 ▲0.07429.15 ▼41.27156.50 ▼2.49
Media Library /wp-admin/upload.php1,703 ▲25.51 ▼0.01137.93 ▼3.17184.31 ▼3.94
Advanced Google Universal Analytics /wp-admin/options-general.php?page=AI-AdvancedGoogleUniversalAnalytics1,3643.0066.64117.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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 | 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-google-universal-analytics/AdvancedGoogleUniversalAnalytics.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
10 plugin tags: wordpress universal analytics, no track role, google universal analytics, advanced google universal analytics, analytics two code tracking...

advanced-google-universal-analytics/AdvancedGoogleUniversalAnalytics.php 85% from 13 tests

Analyzing the main PHP file in "Advanced Google Universal Analytics" version 1.0.3
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-google-universal-analytics.php" instead of "AdvancedGoogleUniversalAnalytics.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 442 characters long)

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
Good job! No executable or dangerous file extensions detected509 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11619427
PO File2242482

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity7.71
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin