72% wp-auto-affiliate-links

Code Review | Auto Affiliate Links

WordPress plugin Auto Affiliate Links scored72%from 54 tests.

About plugin

  • Plugin page: wp-auto-affiliate...
  • Plugin version: 6.4.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 14, 2011
  • Latest release: Nov 18, 2023
  • Number of updates: 713
  • Update frequency: every 6.6 days
  • Top authors: thedark (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

5,000+ active /794,880 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.92MB] [CPU: ▲10.72ms] 75% from 4 tests

Server-side resources used by Auto Affiliate Links
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 871.71ms on /wp-admin/admin.php?page=aal_apimanagement)
PageMemory (MB)CPU Time (ms)
Home /4.39 ▲0.9357.56 ▲18.14
Dashboard /wp-admin4.25 ▲0.9553.47 ▲6.91
Posts /wp-admin/edit.php4.31 ▲0.9553.67 ▲6.34
Add New Post /wp-admin/post-new.php6.81 ▲0.93105.07 ▲20.79
Media Library /wp-admin/upload.php4.11 ▲0.8843.65 ▲11.50
API Management /wp-admin/admin.php?page=aal_apimanagement4.05871.71
Envato Marketplace Links /wp-admin/admin.php?page=aal_module_envato4.0739.02
Commission Junction Links /wp-admin/admin.php?page=aal_module_cj4.0740.02
General Settings /wp-admin/admin.php?page=aal_general_settings4.0942.88
Walmart Links /wp-admin/admin.php?page=aal_module_walmart4.0738.71
Shareasale Links /wp-admin/admin.php?page=aal_module_shareasale4.0742.69
Import/Export /wp-admin/admin.php?page=aal_import_export4.0837.70
Exclude Words /wp-admin/admin.php?page=aal_exclude_words4.0836.58
Auto Affiliate Links - Check urls /wp-admin/admin.php?page=aal_urlcheck4.0837.89
Ebay Links /wp-admin/admin.php?page=aal_module_ebay4.0740.73

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 66 new files
Database: 2 new tables, 14 new options
New tables
wp_automated_links
wp_aal_statistics
New WordPress options
can_compress_scripts
aal_target
aal_showhome
db_upgraded
aal_settings_updated
widget_recent-comments
widget_recent-posts
aal_showlist
widget_aal_widget
aal_pluginstatus
...

Browser metrics Passed 4 tests

An overview of browser requirements for Auto Affiliate Links
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13713.56 ▼1.171.52 ▼0.0543.05 ▼2.23
Dashboard /wp-admin2,300 ▲1225.87 ▲0.2197.52 ▼12.8845.90 ▲0.60
Posts /wp-admin/edit.php2,211 ▲1082.38 ▲0.4345.24 ▲8.9239.76 ▲5.83
Add New Post /wp-admin/post-new.php6,317 ▲4,79126.19 ▲3.31878.18 ▲258.7038.34 ▼11.58
Media Library /wp-admin/upload.php1,505 ▲1024.55 ▲0.39100.60 ▲4.7046.89 ▲1.78
API Management /wp-admin/admin.php?page=aal_apimanagement1,2422.1530.2232.53
Envato Marketplace Links /wp-admin/admin.php?page=aal_module_envato9862.0532.5926.10
Commission Junction Links /wp-admin/admin.php?page=aal_module_cj9542.1831.2831.71
General Settings /wp-admin/admin.php?page=aal_general_settings1,5982.6946.1532.96
Walmart Links /wp-admin/admin.php?page=aal_module_walmart9282.0330.4827.88
Shareasale Links /wp-admin/admin.php?page=aal_module_shareasale9382.1932.4629.59
Import/Export /wp-admin/admin.php?page=aal_import_export1,0652.1630.1832.74
Exclude Words /wp-admin/admin.php?page=aal_exclude_words9872.1731.7328.68
Auto Affiliate Links - Check urls /wp-admin/admin.php?page=aal_urlcheck8832.0431.4523.67
Ebay Links /wp-admin/admin.php?page=aal_module_ebay9312.0433.2826.24

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_aal_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=aal_apimanagement
    • > Warning in wp-content/plugins/wp-auto-affiliate-links/aal_apimanagement.php+126
    file_get_contents(https://autoaffiliatelinks.com/api/apivalidate.php?apikey=): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error

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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-auto-affiliate-links/views/aalLink.php
  • 25× 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/wp-auto-affiliate-links/aal_apimanagement.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'aalModule' not found in wp-content/plugins/wp-auto-affiliate-links/modules/ebay/ebay.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'aalModule' not found in wp-content/plugins/wp-auto-affiliate-links/modules/walmart/walmart.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'aalModule' not found in wp-content/plugins/wp-auto-affiliate-links/modules/clickbank/clickbank.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-auto-affiliate-links/aal_install.php:214
    • > PHP Fatal error
      Uncaught Error: Class 'aalModule' not found in wp-content/plugins/wp-auto-affiliate-links/modules/discoveryjapan/discoveryjapan.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-auto-affiliate-links/aal_excludecats.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'aalModule' not found in wp-content/plugins/wp-auto-affiliate-links/modules/amazon/amazon.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-auto-affiliate-links/aal_metabox.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-auto-affiliate-links/aal_excludewords.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-auto-affiliate-links === )
You can take inspiration from this readme.txt

wp-auto-affiliate-links/WP-auto-affiliate-links.php 92% from 13 tests

Analyzing the main PHP file in "Auto Affiliate Links" version 6.4.2.6
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-auto-affiliate-links.php" instead of "WP-auto-affiliate-links.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected5,625 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP382,5233984,694
JavaScript6490168869
CSS219262

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.80
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods1768.00%
▷ Protected methods00.00%
▷ Private methods832.00%
Functions98
▷ Named functions9798.98%
▷ Anonymous functions11.02%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/delete.png0.56KB0.39KB▼ 29.30%
images/blue.png2.69KB2.15KB▼ 19.85%