84% tradedoubler-affiliate-tracker

Code Review | Grow by Tradedoubler - Advertiser Plugin for WooCommerce

WordPress plugin Grow by Tradedoubler - Advertiser Plugin for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: tradedoubler-affi...
  • Plugin version: 2.0.21
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Aug 26, 2020
  • Latest release: Dec 1, 2023
  • Number of updates: 56
  • Update frequency: every 21.3 days
  • Top authors: tradedoubler (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /7,866 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Grow by Tradedoubler - Advertiser Plugin for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0334.16 ▼4.46
Dashboard /wp-admin3.32 ▼0.0246.26 ▼14.10
Posts /wp-admin/edit.php3.38 ▲0.0245.46 ▼4.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.98 ▼13.33
Media Library /wp-admin/upload.php3.25 ▲0.0237.35 ▲4.58

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 666 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Grow by Tradedoubler - Advertiser Plugin for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲2414.67 ▲0.421.49 ▼0.5337.10 ▼7.99
Dashboard /wp-admin2,213 ▲335.62 ▼0.05105.80 ▲6.8847.96 ▲1.39
Posts /wp-admin/edit.php2,121 ▲211.95 ▼0.0036.68 ▼5.7634.97 ▼7.46
Add New Post /wp-admin/post-new.php1,544 ▲1823.63 ▲0.08671.86 ▲50.1356.96 ▼2.04
Media Library /wp-admin/upload.php1,421 ▲244.21 ▲0.0698.90 ▼44.1541.01 ▼11.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'TradedoublerAPI' not found in wp-content/plugins/tradedoubler-affiliate-tracker/templates/partials/transactions.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Discounts' not found in wp-content/plugins/tradedoubler-affiliate-tracker/src/TradedoublerDiscount/TradedoublerDiscount.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/tradedoubler-affiliate-tracker/templates/partials/codes-alerts.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tradedoubler-affiliate-tracker/templates/partials/pending.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'TradedoublerAPI' not found in wp-content/plugins/tradedoubler-affiliate-tracker/templates/partials/affi.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tradedoubler-affiliate-tracker/templates/partials/stats.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: merchant, marketing, tradedoubler, grow, advertiser...

tradedoubler-affiliate-tracker/index.php 85% from 13 tests

The main file in "Grow by Tradedoubler - Advertiser Plugin for WooCommerce" v. 2.0.21 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: Keep the plugin description shorter than 140 characters (currently 263 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tradedoubler-affiliate-tracker.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin44,611 lines of code in 661 files:
LanguageFilesBlank linesComment linesLines of code
SVG5670035,882
PHP264871664,947
CSS41002,262
JavaScript64101811,520

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity41.83
▷ Minimum class complexity4.00
▷ Maximum class complexity99.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods105
▷ Static methods5047.62%
▷ Public methods9489.52%
▷ Protected methods00.00%
▷ Private methods1110.48%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/code.png2.31KB1.27KB▼ 44.84%
assets/images/finalImage.png23.06KB8.72KB▼ 62.19%