84% edd-ecommerce-analytics

Code Review | eCommerce Analytics for Easy Digital Downloads

WordPress plugin eCommerce Analytics for Easy Digital Downloads scored84%from 54 tests.

About plugin

  • Plugin page: edd-ecommerce-ana...
  • Plugin version: 0.0.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2022
  • Latest release: Aug 29, 2022
  • Number of updates: 16
  • Update frequency: every 0.6 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /1,034 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.76ms] Passed 4 tests

An overview of server-side resources used by eCommerce Analytics for Easy Digital Downloads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.31 ▼1.54
Dashboard /wp-admin3.35 ▲0.0545.35 ▼2.83
Posts /wp-admin/edit.php3.41 ▲0.0550.48 ▼0.26
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.41 ▼18.41
Media Library /wp-admin/upload.php3.28 ▲0.0536.44 ▲1.05

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for eCommerce Analytics for Easy Digital Downloads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.391.75 ▼0.1944.21 ▼2.94
Dashboard /wp-admin2,195 ▲185.58 ▼0.0590.56 ▲4.7840.62 ▼0.25
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0041.97 ▲3.4434.70 ▲2.02
Add New Post /wp-admin/post-new.php1,526 ▼023.21 ▲0.15744.11 ▲123.6757.72 ▲8.04
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.05101.56 ▲0.3743.02 ▼1.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/edd-ecommerce-analytics/edd-ecommerce-analytics.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (No screenshot yet.) image required
Please take inspiration from this readme.txt

edd-ecommerce-analytics/edd-ecommerce-analytics.php Passed 13 tests

The entry point to "eCommerce Analytics for Easy Digital Downloads" version 0.0.7 is a PHP file that has certain tags in its header comment area
65 characters long description:
Send the Easy Digital Downloads events to Google Analytics (GA4).

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 detected287 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22829262
JSON11025

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin