78% affiliate-booster

Code Review | WP Affiliate Link Manager

WordPress plugin WP Affiliate Link Manager scored78%from 54 tests.

About plugin

  • Plugin page: affiliate-booster
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2018
  • Latest release: Jan 18, 2023
  • Number of updates: 13
  • Update frequency: every 120.6 days
  • Top authors: kabeers011 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /970 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼10.13ms] Passed 4 tests

An overview of server-side resources used by WP Affiliate Link Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0433.75 ▼1.94
Dashboard /wp-admin3.39 ▲0.0446.90 ▼16.15
Posts /wp-admin/edit.php3.44 ▲0.0843.53 ▼2.75
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.78 ▼19.68
Media Library /wp-admin/upload.php3.31 ▲0.0836.96 ▲4.25
Affiliate Booster /wp-admin/options-general.php?page=affiliate-boost-options3.2630.96
Style /wp-admin/admin.php?page=affiliate-boost-style3.2528.43

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: 2 new tables, 6 new options
New tables
wp_affiliate_boost
wp_affiliate_boost_website
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Affiliate Link Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.36 ▲0.012.06 ▲0.4043.02 ▲3.37
Dashboard /wp-admin2,199 ▲185.65 ▼0.0691.35 ▼6.0541.41 ▼0.62
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0237.61 ▼2.3034.37 ▼5.27
Add New Post /wp-admin/post-new.php1,530 ▼523.37 ▲5.25658.55 ▲33.4553.04 ▼18.84
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.06107.34 ▲10.3946.21 ▲4.35
Affiliate Booster /wp-admin/options-general.php?page=affiliate-boost-options1,2872.4650.6653.35
Style /wp-admin/admin.php?page=affiliate-boost-style1,0061.6829.2128.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=affiliate-boost-style
    • > Notice in wp-content/plugins/affiliate-booster/affiliate-classes.php+448
    Undefined index: tab

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=affiliate-boost-options
    • > Javascript (severe) in unknown
    /wp-content/plugins/affiliate-booster/dist/jquery.tablegrid.min.js?ver=6.3.1 5:2498 Uncaught TypeError: Cannot read properties of null (reading 'current')
    • > GET request to /wp-admin/admin.php?page=affiliate-boost-style
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).bootgrid is not a function" "TypeError: jQuery(...).bootgrid is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=affiliate-boost-style:243:42)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=affiliate-boost-style
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).bootgrid is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5 in affiliate-booster/assets to your readme.txt
Please take inspiration from this readme.txt

affiliate-booster/affiliate-booster.php 92% from 13 tests

The principal PHP file in "WP Affiliate Link Manager" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 195 characters long)

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 plugin1,211 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP410353787
SVG100229
CSS2210189
JavaScript30106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity24.50
▷ Minimum class complexity22.00
▷ Maximum class complexity27.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin