88% affiliate-booster

Code Review | WP Affiliate Link Manager

WordPress plugin WP Affiliate Link Manager scored 88% from 54 tests.

About plugin

  • Plugin page: affiliate-booster
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 5.8.1
  • First release: Oct 4, 2018
  • Latest release: Jan 8, 2020
  • Number of updates: 12
  • Update frequency: every 38.5 days
  • Top authors: kabeers011 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 550 total downloads

Benchmarks

Plugin footprint Passed 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.07MB] [CPU: ▼141.92ms] 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 /2.88 ▲0.1530.00 ▲6.06
Dashboard /wp-admin3.14 ▲0.0852.25 ▲8.36
Posts /wp-admin/edit.php3.19 ▲0.0844.92 ▼5.27
Add New Post /wp-admin/post-new.php5.50 ▲0.0695.79 ▼567.52
Media Library /wp-admin/upload.php3.08 ▲0.0834.14 ▼0.93
Style /wp-admin/admin.php?page=affiliate-boost-style3.0328.25
Affiliate Booster /wp-admin/options-general.php?page=affiliate-boost-options3.0329.84

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, no new options
New tables
wp_affiliate_boost
wp_affiliate_boost_website

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 /3,688 ▲9216.30 ▲0.228.41 ▼0.5052.44 ▼1.93
Dashboard /wp-admin2,994 ▲635.92 ▼0.20144.40 ▼14.07114.48 ▼15.54
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0067.57 ▼6.4991.91 ▼1.86
Add New Post /wp-admin/post-new.php1,503 ▼18218.67 ▼0.50404.78 ▲14.72110.31 ▼9.12
Media Library /wp-admin/upload.php1,812 ▲25.02 ▲0.03152.81 ▼1.50136.34 ▲17.45
Style /wp-admin/admin.php?page=affiliate-boost-style1,3412.3659.9580.50
Affiliate Booster /wp-admin/options-general.php?page=affiliate-boost-options1,6423.3090.4379.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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/options-general.php?page=affiliate-boost-options
    • > 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/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=5.8.1 1:31592 "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=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" 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=5.8.1 1:31702 Uncaught TypeError: jQuery(...).bootgrid is not a function
    • > 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=5.8.1 5:2498 Uncaught TypeError: Cannot read properties of null (reading 'current')

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.0 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