73% email-tracker

Code Review | Email Tracker – Email Tracking Plugin to track Emails for Open and Email Links Click (Compatible with WooCommerce)

WordPress plugin Email Tracker – Email Tracking Plugin to track Emails for Open and Email Links Click (Compatible with WooCommerce) scored73%from 54 tests.

About plugin

  • Plugin page: email-tracker
  • Plugin version: 5.3.9
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 29, 2016
  • Latest release: Jul 21, 2023
  • Number of updates: 153
  • Update frequency: every 15.8 days
  • Top authors: pmbaldha (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

800+ active /17,555 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.41MB] [CPU: ▲18.49ms] 75% from 4 tests

This is a short check of server-side resources used by Email Tracker – Email Tracking Plugin to track Emails for Open and Email Links Click (Compatible with WooCommerce)
Please take the time to fix the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.41MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.20 ▲5.7461.29 ▲25.92
Dashboard /wp-admin9.22 ▲5.8772.05 ▲16.66
Posts /wp-admin/edit.php9.22 ▲5.8677.53 ▲28.66
Add New Post /wp-admin/post-new.php10.04 ▲4.15103.28 ▲2.72
Media Library /wp-admin/upload.php9.22 ▲5.9967.27 ▲35.13
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2257.79

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 314 new files
Database: 4 new tables, 11 new options
New tables
wp_emtr_track_email_link_master
wp_emtr_track_email_link_click_log
wp_emtr_track_email_open_log
wp_emtr_email
New WordPress options
emtr_db_version
db_upgraded
can_compress_scripts
emtr_version
theysaidso_admin_options
fs_active_plugins
widget_recent-posts
fs_accounts
fs_debug_mode
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Email Tracker – Email Tracking Plugin to track Emails for Open and Email Links Click (Compatible with WooCommerce)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8614.34 ▲0.091.80 ▲0.3629.59 ▼9.01
Dashboard /wp-admin2,228 ▲485.58 ▼0.0986.37 ▼12.7640.60 ▼4.39
Posts /wp-admin/edit.php2,134 ▲341.98 ▼0.0535.32 ▲0.3834.12 ▲3.60
Add New Post /wp-admin/post-new.php1,555 ▲2718.72 ▼4.36607.52 ▼46.7167.11 ▲5.30
Media Library /wp-admin/upload.php1,433 ▲334.14 ▼0.0996.54 ▲4.4342.75 ▲2.59
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1011.6823.3825.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/email-tracker/libs/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • fs_active_plugins
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_debug_mode
    • can_compress_scripts
    • widget_recent-posts
    • fs_accounts
    • db_upgraded
    • theysaidso_admin_options

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
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 take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/email-tracker/vendor/soundasleep/html2text/tests/Html2TextTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ComponentTests\\ComponentTest' not found in wp-content/plugins/email-tracker/vendor/soundasleep/html2text/tests/Html2TextComponentTest.php:3
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/email-tracker/vendor/soundasleep/html2text/convert.php on line 8
    • > PHP Notice
      Undefined variable: argv in wp-content/plugins/email-tracker/vendor/soundasleep/html2text/convert.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/email-tracker/email-tracker-main.php:4
    • > PHP Fatal error
      Uncaught InvalidArgumentException: Expected: php -f convert.php [input file] in wp-content/plugins/email-tracker/vendor/soundasleep/html2text/convert.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
3 plugin tags: email-mail-email, email, email-woocommerce-email

email-tracker/email-tracker.php 92% from 13 tests

"Email Tracker – Email Tracking Plugin to track Emails for Open and Email Links Click (Compatible with WooCommerce)" version 5.3.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "5.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin38,108 lines of code in 231 files:
LanguageFilesBlank linesComment linesLines of code
PHP1758,68618,38236,299
JavaScript8122144700
HTML22770468
Markdown41130328
JSON500147
PO File14647125
CSS141124
YAML10010
XML1017

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity55.55
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces11
Interfaces9
Traits0
Classes77
▷ Abstract classes33.90%
▷ Concrete classes7496.10%
▷ Final classes45.41%
Methods1,493
▷ Static methods23615.81%
▷ Public methods1,09873.54%
▷ Protected methods171.14%
▷ Private methods37825.32%
Functions120
▷ Named functions11999.17%
▷ Anonymous functions10.83%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
libs/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
images/track-log.png0.90KB0.09KB▼ 89.69%