62% thirstyaffiliates

Code Review | ThirstyAffiliates - Affiliate Links, Link Branding, Link Tracking & Marketing Plugin

WordPress plugin ThirstyAffiliates - Affiliate Links, Link Branding, Link Tracking & Marketing Plugin scored62%from 54 tests.

About plugin

  • Plugin page: thirstyaffiliates
  • Plugin version: 3.10.21
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 15, 2013
  • Latest release: Nov 15, 2023
  • Number of updates: 131
  • Update frequency: every 29.0 days
  • Top authors: jkohlbach (72.52%)caseproof (22.9%)supercleanse (4.58%)cartpauj (2.29%)

Code review

54 tests

User reviews

225 reviews

Install metrics

30,000+ active /1,042,350 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.07MB] [CPU: ▲7.09ms] 75% from 4 tests

A check of server-side resources used by ThirstyAffiliates - Affiliate Links, Link Branding, Link Tracking & Marketing Plugin
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 703.74ms on /wp-admin/edit-tags.php?taxonomy=thirstylink-category&post_type=thirstylink)
PageMemory (MB)CPU Time (ms)
Home /5.48 ▲2.0151.45 ▲11.81
Dashboard /wp-admin5.43 ▲2.0855.92 ▼4.95
Posts /wp-admin/edit.php5.49 ▲2.1266.27 ▲19.19
Add New Post /wp-admin/post-new.php8.16 ▲2.2799.64 ▲3.90
Media Library /wp-admin/upload.php5.29 ▲2.0652.29 ▲17.58
Settings /wp-admin/edit.php?post_type=thirstylink&page=thirsty-settings5.2950.33
Import CSV /wp-admin/edit.php?post_type=thirstylink&page=thirsty_import5.2847.31
Reports /wp-admin/edit.php?post_type=thirstylink&page=thirsty-reports5.2846.82
Link Categories /wp-admin/edit-tags.php?taxonomy=thirstylink-category&post_type=thirstylink5.36703.74
Affiliate Links /wp-admin/edit.php?post_type=thirstylink5.4458.38
Amazon Import /wp-admin/edit.php?post_type=thirstylink&page=amazon_import5.2844.52
New Affiliate Link /wp-admin/post-new.php?post_type=thirstylink5.5864.91
Export CSV /wp-admin/edit.php?post_type=thirstylink&page=thirsty_export5.2852.60
Event Notifications /wp-admin/edit.php?post_type=thirstylink&page=thirsty_event_notifications5.2947.10

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 204 new files
Database: 2 new tables, 24 new options
New tables
wp_ta_link_clicks_meta
wp_ta_link_clicks
New WordPress options
ta_enable_bot_crawl_blocker_script
ta_database_tables_created
ta_used_link_prefixes
ta_link_prefix_custom
ta_clean_up_plugin_options
db_upgraded
ta_guided_tour_status
widget_theysaidso_widget
ta_settings_initialized
thirstyaff_notifications
...

Browser metrics Passed 4 tests

An overview of browser requirements for ThirstyAffiliates - Affiliate Links, Link Branding, Link Tracking & Marketing Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲21813.52 ▼1.1912.39 ▲10.7238.11 ▼4.29
Dashboard /wp-admin2,298 ▲1185.64 ▲0.03102.50 ▲2.4741.18 ▼3.27
Posts /wp-admin/edit.php2,208 ▲1052.09 ▲0.1545.03 ▲7.4438.10 ▼0.19
Add New Post /wp-admin/post-new.php1,603 ▲6723.55 ▲0.40668.90 ▼28.3742.37 ▼6.81
Media Library /wp-admin/upload.php1,508 ▲1114.31 ▲0.09102.40 ▲3.3444.58 ▲2.26
Settings /wp-admin/edit.php?post_type=thirstylink&page=thirsty-settings1,5882.8662.3353.01
Import CSV /wp-admin/edit.php?post_type=thirstylink&page=thirsty_import1,2442.2725.4142.97
Reports /wp-admin/edit.php?post_type=thirstylink&page=thirsty-reports1,3242.7267.5842.34
Link Categories /wp-admin/edit-tags.php?taxonomy=thirstylink-category&post_type=thirstylink1,3822.2431.6131.91
Affiliate Links /wp-admin/edit.php?post_type=thirstylink1,6012.5241.7642.60
Amazon Import /wp-admin/edit.php?post_type=thirstylink&page=amazon_import1,3372.2727.9137.71
New Affiliate Link /wp-admin/post-new.php?post_type=thirstylink2,7344.8085.63123.67
Export CSV /wp-admin/edit.php?post_type=thirstylink&page=thirsty_export1,2302.2731.4241.88
Event Notifications /wp-admin/edit.php?post_type=thirstylink&page=thirsty_event_notifications1,4962.3028.8438.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_ta_link_clicks_meta
    • wp_ta_link_clicks
  • Zombie WordPress options detected upon uninstall: 23 options
    • ta_link_redirect_type
    • ta_activation_time
    • ta_enable_javascript_frontend_redirect
    • ta_enable_bot_crawl_blocker_script
    • ta_dismiss_marketing_notice_option
    • ta_migration_complete_flag
    • widget_recent-comments
    • ta_show_enable_js_redirect_notice
    • theysaidso_admin_options
    • ta_link_prefix
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/thirstyaffiliates/views/promotion.php
    • > /wp-content/plugins/thirstyaffiliates/Models/Notifications.php
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ThirstyAffiliates\\Interfaces\\Model_Interface' not found in wp-content/plugins/thirstyaffiliates/Models/Marketing.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'ThirstyAffiliates\\Interfaces\\Model_Interface' not found in wp-content/plugins/thirstyaffiliates/Models/Affiliate_Links_CPT.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ThirstyAffiliates\\Interfaces\\Model_Interface' not found in wp-content/plugins/thirstyaffiliates/Models/Guided_Tour.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'ThirstyAffiliates\\Interfaces\\Model_Interface' not found in wp-content/plugins/thirstyaffiliates/Models/Link_Fixer.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'ThirstyAffiliates\\Interfaces\\Model_Interface' not found in wp-content/plugins/thirstyaffiliates/Models/Stats_Reporting.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'ThirstyAffiliates\\Interfaces\\Model_Interface' not found in wp-content/plugins/thirstyaffiliates/Models/Affiliate_Link_Attachment.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'ThirstyAffiliates\\Interfaces\\Model_Interface' not found in wp-content/plugins/thirstyaffiliates/Models/Link_Picker.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'ThirstyAffiliates\\Interfaces\\Model_Interface' not found in wp-content/plugins/thirstyaffiliates/Models/REST_API.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/thirstyaffiliates/views/linkpicker/advance-link-picker.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'ThirstyAffiliates\\Interfaces\\Model_Interface' not found in wp-content/plugins/thirstyaffiliates/Models/Shortcodes.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=thirstylink
    • > Deprecation (warning) in unknown
    /wp-content/plugins/thirstyaffiliates/js/app/affiliate_link_page/dist/affiliate-link-page.js?ver=3.10.21 23 Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.

Optimizations

Plugin configuration 93% 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:
  • Tags: Please reduce the number of tags, currently 38 tag instead of maximum 10
You can take inspiration from this readme.txt

thirstyaffiliates/thirstyaffiliates.php 92% from 13 tests

The main PHP file in "ThirstyAffiliates - Affiliate Links, Link Branding, Link Tracking & Marketing Plugin" ver. 3.10.21 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin40,531 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
JSON110024,300
PHP432,8164,2966,910
JavaScript591,3241,0105,513
CSS21191331,924
PO File12973291,081
Sass151523792
XML1008
SVG3003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity44.58
▷ Minimum class complexity1.00
▷ Maximum class complexity138.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces4
Interfaces4
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods352
▷ Static methods195.40%
▷ Public methods31589.49%
▷ Protected methods00.00%
▷ Private methods3710.51%
Functions14
▷ Named functions214.29%
▷ Anonymous functions1285.71%
Constants21
▷ Global constants00.00%
▷ Class constants21100.00%
▷ Public constants21100.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
16 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/b6a9a66c9b34aeba2f02831641b2a568.png1.30KB1.63KB0.00%
css/lib/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png0.29KB0.15KB▼ 49.83%
css/lib/jquery-ui/images/ui-icons_cd0a0a_256x240.png4.49KB4.18KB▼ 6.89%
images/admin-review-notice-logo.png3.36KB3.29KB▼ 2.21%
css/lib/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png0.36KB0.15KB▼ 59.57%