78% affiliatebooster-blocks

Code Review | Affiliate Booster - Pros & Cons, Notice, and CTA Blocks for Affiliates

WordPress plugin Affiliate Booster - Pros & Cons, Notice, and CTA Blocks for Affiliates scored78%from 54 tests.

About plugin

  • Plugin page: affiliatebooster-...
  • Plugin version: 3.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 28, 2020
  • Latest release: Jun 27, 2023
  • Number of updates: 48
  • Update frequency: every 19.0 days
  • Top authors: affiliatebooster (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

5,000+ active /40,764 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.36ms] Passed 4 tests

An overview of server-side resources used by Affiliate Booster - Pros & Cons, Notice, and CTA Blocks for Affiliates
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.02 ▲0.05
Dashboard /wp-admin3.35 ▲0.0153.56 ▼12.47
Posts /wp-admin/edit.php3.46 ▲0.1153.18 ▼0.19
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.29 ▼4.82
Media Library /wp-admin/upload.php3.27 ▲0.0439.89 ▲6.54
Enable/Disable Affiliate Booster Blocks /wp-admin/options-general.php?page=affiliate_booster_blocks3.8144.91

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 307 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Affiliate Booster - Pros & Cons, Notice, and CTA Blocks for Affiliates: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7513.50 ▼1.234.16 ▲2.3540.35 ▼3.09
Dashboard /wp-admin2,240 ▲635.77 ▲0.1286.58 ▼10.8777.51 ▲37.97
Posts /wp-admin/edit.php2,144 ▲412.27 ▲0.2437.16 ▼4.8035.49 ▼0.17
Add New Post /wp-admin/post-new.php6,248 ▲4,84128.06 ▲10.251,086.05 ▲454.1540.12 ▼9.00
Media Library /wp-admin/upload.php1,448 ▲514.43 ▲0.22100.31 ▼0.9372.40 ▲24.55
Enable/Disable Affiliate Booster Blocks /wp-admin/options-general.php?page=affiliate_booster_blocks97810.48305.2735.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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 fix the following
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant AFB_DIR - assumed 'AFB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/affiliatebooster-blocks/src/affiliate-helpers/class-affiliate-helper.php on line 101
    • > PHP Warning
      require_once(AFB_DIRdisableblocks/class-abdgb-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/affiliatebooster-blocks/disableblocks/class-abdgb-admin-page.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/affiliatebooster-blocks/disableblocks/class-abdgb-list-table.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'AFB_DIRdisableblocks/class-abdgb-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/affiliatebooster-blocks/disableblocks/class-abdgb-admin-page.php on line 3
    • > PHP Warning
      require(AFB_DIRsrc/affiliate-helpers/class-affiliate-config.php): failed to open stream: No such file or directory in wp-content/plugins/affiliatebooster-blocks/src/affiliate-helpers/class-affiliate-helper.php on line 101
    • > PHP Warning
      Use of undefined constant AFB_DIR - assumed 'AFB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/affiliatebooster-blocks/disableblocks/class-abdgb-admin-page.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/affiliatebooster-blocks/disableblocks/class-abdgb-list-table.php on line 3
    • > PHP Fatal error
      require(): Failed opening required 'AFB_DIRsrc/affiliate-helpers/class-affiliate-helper.php' (include_path='.:/usr/share/php') in wp-content/plugins/affiliatebooster-blocks/src/affiliate-helpers/class-affiliate-loader.php on line 51
    • > PHP Warning
      require(AFB_DIRsrc/affiliate-helpers/class-affiliate-helper.php): failed to open stream: No such file or directory in wp-content/plugins/affiliatebooster-blocks/src/affiliate-helpers/class-affiliate-loader.php on line 51
    • > PHP Fatal error
      require(): Failed opening required 'AFB_DIRsrc/affiliate-helpers/class-affiliate-config.php' (include_path='.:/usr/share/php') in wp-content/plugins/affiliatebooster-blocks/src/affiliate-helpers/class-affiliate-helper.php on line 101

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_booster_blocks
    • > Network (severe)
    wp-content/plugins/affiliatebooster-blocks//dist/assets/js/ab-global-setting.js - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Requires at least: Version format is invalid
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6, #7, #8, #9 in affiliatebooster-blocks/assets to your readme.txt
You can take inspiration from this readme.txt

affiliatebooster-blocks/affiliatebooster-blocks.php Passed 13 tests

The entry point to "Affiliate Booster - Pros & Cons, Notice, and CTA Blocks for Affiliates" version 3.0.4 is a PHP file that has certain tags in its header comment area
43 characters long description:
#1 affiliate plugin to increase your sales.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin120,159 lines of code in 255 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1293,11576647,241
JSON20038,435
Sass541,55119711,956
CSS372,1915511,002
PHP131,0807407,222
SVG201554,303

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity58.90
▷ Minimum class complexity1.00
▷ Maximum class complexity408.00
Average method complexity7.75
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes220.00%
Methods86
▷ Static methods4552.33%
▷ Public methods8497.67%
▷ Protected methods00.00%
▷ Private methods22.33%
Functions22
▷ Named functions1986.36%
▷ Anonymous functions313.64%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
19 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png8.11KB3.98KB▼ 50.95%
assets/images/11-notification-1.png1.11KB1.08KB▼ 2.12%
assets/images/13-coupon-1.png1.50KB1.47KB▼ 1.96%
assets/images/05-good-and-bad-features-1.png1.39KB1.37KB▼ 1.75%
assets/images/list-check.png1.41KB0.72KB▼ 48.96%