10% affiliate-mlm-party-plan

Code Review | AFFILIATE MLM / PARTY PLAN

WordPress plugin AFFILIATE MLM / PARTY PLAN scored10%from 54 tests.

About plugin

  • Plugin page: affiliate-mlm-par...
  • Plugin version: 2.6.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Sep 8, 2023
  • Number of updates: 193
  • Update frequency: every 14.0 days
  • Top authors: socialbug (99.48%)Otto42 (1.04%)

Code review

54 tests

User reviews

18 reviews

Install metrics

90+ active /30,356 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/affiliate-mlm-party-plan/includes/sb.php+2462
    Undefined index: choose_affiliate_in_checkout

Server metrics [RAM: ▼1.11MB] [CPU: ▼48.86ms] Passed 4 tests

Analyzing server-side resources used by AFFILIATE MLM / PARTY PLAN
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▼0.599.83 ▼35.49
Dashboard /wp-admin2.89 ▼0.4111.77 ▼37.82
Posts /wp-admin/edit.php2.89 ▼0.469.74 ▼33.36
Add New Post /wp-admin/post-new.php2.89 ▼2.999.88 ▼88.78
Media Library /wp-admin/upload.php2.89 ▼0.3410.92 ▼24.06
Affiliate Users /wp-admin/admin.php?page=affiliate-mlm-party-plan/bv-affiliate-users.php2.8912.26
Integrations /wp-admin/admin.php?page=sb_integrations_list2.8910.06

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 58 new files
Database: 2 new tables, 7 new options
New tables
wp_socialbug_affiliates
wp_sb_integrations
New WordPress options
widget_recent-comments
widget_theysaidso_widget
sb_version
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

AFFILIATE MLM / PARTY PLAN: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲7714.80 ▲0.432.08 ▼0.0445.14 ▲2.29
Dashboard /wp-admin2,226 ▲385.79 ▼0.02104.47 ▼3.9642.44 ▲5.36
Posts /wp-admin/edit.php2,109 ▲202.02 ▼0.0334.62 ▼3.9237.83 ▲5.26
Add New Post /wp-admin/post-new.php1,551 ▲1823.07 ▼0.39629.68 ▲39.4252.38 ▲4.30
Media Library /wp-admin/upload.php1,405 ▲144.19 ▲0.0394.34 ▼9.7941.30 ▼2.28
Affiliate Users /wp-admin/admin.php?page=affiliate-mlm-party-plan/bv-affiliate-users.php8422.1129.0728.25
Integrations /wp-admin/admin.php?page=sb_integrations_list1,0292.0525.7826.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/affiliate-mlm-party-plan/includes/sb.php+2462
    Undefined index: choose_affiliate_in_checkout
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_sb_integrations
    • wp_socialbug_affiliates
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • sb_version
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sb_integrations_list
    • > Notice in wp-content/plugins/affiliate-mlm-party-plan/includes/sb.php+2462
    Undefined index: choose_affiliate_in_checkout

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 32× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Unisho\\Sb\\DataStruct' not found in wp-content/plugins/affiliate-mlm-party-plan/classes/DiscountResultData.php:8
    • > PHP Warning
      Use of undefined constant AFFILIATE_USERS_DIR - assumed 'AFFILIATE_USERS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/affiliate-mlm-party-plan/includes/sb.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Unisho\\Sb\\DataStruct' not found in wp-content/plugins/affiliate-mlm-party-plan/classes/AddressData.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Unisho\\Sb\\DataStruct' not found in wp-content/plugins/affiliate-mlm-party-plan/classes/CustomerData.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Unisho\\Sb\\DataStruct' not found in wp-content/plugins/affiliate-mlm-party-plan/classes/ProductAttributeData.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Unisho\\Sb\\DataStruct' not found in wp-content/plugins/affiliate-mlm-party-plan/classes/ShippingOptionData.php:8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/affiliate-mlm-party-plan/includes/usersList.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Unisho\\Sb\\DataStruct' not found in wp-content/plugins/affiliate-mlm-party-plan/classes/ShipmentData.php:8
    • > PHP Warning
      require_once(AFFILIATE_USERS_DIRincludes/socialbug-api.php): failed to open stream: No such file or directory in wp-content/plugins/affiliate-mlm-party-plan/includes/sb.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Unisho\\Sb\\DataStruct' not found in wp-content/plugins/affiliate-mlm-party-plan/classes/ProductVariantImage.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Screenshots: Please add an image for screenshot #6 (Email Templates)
Please take inspiration from this readme.txt

affiliate-mlm-party-plan/bv-affiliate-users.php 92% from 13 tests

"AFFILIATE MLM / PARTY PLAN" version 2.6.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("affiliate-mlm-party-plan.php" instead of "bv-affiliate-users.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected4,230 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP508061,7974,225
JavaScript4004
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.89
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity1.51
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces3
Interfaces20
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods610
▷ Static methods10.16%
▷ Public methods60599.18%
▷ Protected methods50.82%
▷ Private methods00.00%
Functions68
▷ Named functions6798.53%
▷ Anonymous functions11.47%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected