93% edd-google-analytics-universal-ecommerce

Code Review | EDD Google Analytics Universal Ecommerce

WordPress plugin EDD Google Analytics Universal Ecommerce scored 93% from 54 tests.

About plugin

  • Plugin page: edd-google-analyt...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.2
  • WordPress version: 5.8.1
  • First release: Jun 13, 2014
  • Latest release: Jul 14, 2021
  • Number of updates: 15
  • Update frequency: every 172.5 days
  • Top authors: danlester (80%)chrisakelley (20%)levertechadmin (13.33%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 2,440 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by EDD Google Analytics Universal Ecommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1340.86 ▲19.29
Dashboard /wp-admin3.07 ▲0.0248.36 ▲5.68
Posts /wp-admin/edit.php3.12 ▲0.0249.40 ▲2.69
Add New Post /wp-admin/post-new.php5.43 ▼0.0092.91 ▼574.67
Media Library /wp-admin/upload.php3.02 ▲0.0137.00 ▲0.43

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for EDD Google Analytics Universal Ecommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.27 ▲0.8010.29 ▲0.5950.94 ▲3.61
Dashboard /wp-admin2,973 ▲395.86 ▼0.08160.98 ▲11.11112.06 ▼6.65
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0071.27 ▼1.8192.99 ▲0.82
Add New Post /wp-admin/post-new.php1,683 ▼018.73 ▼0.00379.68 ▼6.50112.35 ▼0.67
Media Library /wp-admin/upload.php1,807 ▼05.06 ▲0.02169.07 ▲7.39119.24 ▼12.91

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
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-google-analytics-universal-ecommerce/edd_gauniversal_ecommerce.php:86

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === edd-google-analytics-universal-ecommerce === )
Please take inspiration from this readme.txt

edd-google-analytics-universal-ecommerce/edd_gauniversal_ecommerce.php 85% from 13 tests

The main file in "EDD Google Analytics Universal Ecommerce" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 172 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("edd-google-analytics-universal-ecommerce.php" instead of "edd_gauniversal_ecommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.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 files were detected