68% easy-affiliate-links

Code Review | Easy Affiliate Links

WordPress plugin Easy Affiliate Links scored68%from 54 tests.

About plugin

  • Plugin page: easy-affiliate-links
  • Plugin version: 3.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Mar 23, 2015
  • Latest release: Aug 8, 2023
  • Number of updates: 78
  • Update frequency: every 39.3 days
  • Top authors: BrechtVds (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

10,000+ active /248,680 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: ▲0.18MB] [CPU: ▲2.70ms] Passed 4 tests

This is a short check of server-side resources used by Easy Affiliate Links
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.30 ▲3.31
Dashboard /wp-admin3.49 ▲0.1949.70 ▲1.38
Posts /wp-admin/edit.php3.54 ▲0.1956.85 ▲7.15
Add New Post /wp-admin/post-new.php6.22 ▲0.3493.46 ▼0.41
Media Library /wp-admin/upload.php3.41 ▲0.1941.61 ▲6.53
Tools /wp-admin/admin.php?page=eafl_tools3.4138.23
Import & Export /wp-admin/admin.php?page=eafl_import_export3.4137.47
Migration /wp-admin/admin.php?page=eafl_migration3.4136.56
Link Usage /wp-admin/admin.php?page=eafl_find_relations3.4152.03
Settings /wp-admin/admin.php?page=bv_settings_eafl3.4034.30
FAQ & Support /wp-admin/admin.php?page=eafl_faq3.4140.14
Manage /wp-admin/admin.php?page=easyaffiliatelinks3.3837.84
Click Statistics /wp-admin/admin.php?page=eafl_statistics3.4135.53
Upgrade EAFL /wp-admin/admin.php?page=eafl_addons3.4136.72

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 263 new files
Database: 2 new tables, 11 new options
New tables
wp_eafl_relations
wp_eafl_clicks
New WordPress options
widget_recent-posts
widget_theysaidso_widget
eafl_flush
eafl_activated
can_compress_scripts
widget_recent-comments
eafl_click_db_version
eafl_relation_db_version
eafl_migrated_to_version
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Easy Affiliate Links: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲15515.83 ▲1.552.92 ▲1.0842.19 ▼1.62
Dashboard /wp-admin2,263 ▲727.57 ▲1.67186.97 ▲87.0939.87 ▼0.49
Posts /wp-admin/edit.php2,159 ▲703.82 ▲1.7676.56 ▲33.8435.69 ▼3.57
Add New Post /wp-admin/post-new.php6,410 ▲4,86826.61 ▲8.53972.99 ▲358.2737.41 ▼7.98
Media Library /wp-admin/upload.php1,458 ▲735.60 ▲1.42119.73 ▲21.5943.95 ▲1.36
Tools /wp-admin/admin.php?page=eafl_tools8873.7849.3327.05
Import & Export /wp-admin/admin.php?page=eafl_import_export8743.7849.4632.31
Migration /wp-admin/admin.php?page=eafl_migration8353.7647.8722.73
Link Usage /wp-admin/admin.php?page=eafl_find_relations8543.8451.0622.24
Settings /wp-admin/admin.php?page=bv_settings_eafl1,7487.15135.1463.76
FAQ & Support /wp-admin/admin.php?page=eafl_faq1,0517.6663.1244.84
Manage /wp-admin/admin.php?page=easyaffiliatelinks1,6135.49141.4940.86
Click Statistics /wp-admin/admin.php?page=eafl_statistics8553.7748.6223.95
Upgrade EAFL /wp-admin/admin.php?page=eafl_addons9133.7849.6028.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 2 tables
    • wp_eafl_relations
    • wp_eafl_clicks
  • This plugin does not fully uninstall, leaving 11 options in the database
    • can_compress_scripts
    • eafl_activated
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • eafl_flush
    • eafl_migrated_to_version
    • widget_recent-posts
    • eafl_relation_db_version
    • eafl_click_db_version
    • ...

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/easy-affiliate-links/templates/admin/menu/import-export/export-csv.php
    • > /wp-content/plugins/easy-affiliate-links/templates/admin/menu/import-export/export-xml.php
  • 78× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-affiliate-links/includes/admin/class-eafl-feedback.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-affiliate-links/includes/class-eafl-i18n.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/easy-affiliate-links/templates/admin/menu/faq.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/easy-affiliate-links/templates/admin/menu/migration.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-affiliate-links/includes/admin/menu/class-eafl-admin-menu-faq.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-affiliate-links/includes/admin/class-eafl-migrations.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-affiliate-links/includes/public/api/class-eafl-api-manage-categories.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/easy-affiliate-links/templates/settings/group-shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-affiliate-links/includes/admin/tools/class-eafl-tools-find-relations.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-affiliate-links/includes/admin/menu/class-eafl-admin-menu.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: links, cloaking, shortlink, affiliate

easy-affiliate-links/easy-affiliate-links.php Passed 13 tests

The main file in "Easy Affiliate Links" v. 3.7.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
49 characters long description:
Easily manage and cloak all your affiliate links.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin52,291 lines of code in 252 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript948,9734,32041,423
PHP931,1653,5548,135
CSS586291,376
Sass2622141,320
SVG330033
Markdown1304

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity17.33
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes61
▷ Abstract classes11.64%
▷ Concrete classes6098.36%
▷ Final classes00.00%
Methods390
▷ Static methods23259.49%
▷ Public methods32082.05%
▷ Protected methods6316.15%
▷ Private methods71.79%
Functions14
▷ Named functions321.43%
▷ Anonymous functions1178.57%
Constants94
▷ Global constants88.51%
▷ Class constants8691.49%
▷ Public constants86100.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
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/faq/editor-button.png16.88KB5.83KB▼ 65.48%
assets/images/icon-128x128.png9.14KB3.54KB▼ 61.30%
assets/images/icon-20x20.png1.87KB0.99KB▼ 47.32%