10% binary-mlm-plan

Code Review | Binary MLM Plan

WordPress plugin Binary MLM Plan scored10%from 54 tests.

About plugin

  • Plugin page: binary-mlm-plan
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Apr 30, 2019
  • Latest release: May 11, 2023
  • Number of updates: 16
  • Update frequency: every 92.0 days
  • Top authors: letscms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /8,962 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/binary-mlm-plan/includes/class-bmp-install.php+605
    Undefined variable: b

Server metrics [RAM: ▲0.80MB] [CPU: ▲1.86ms] Passed 4 tests

This is a short check of server-side resources used by Binary MLM Plan
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6844.95 ▼3.17
Dashboard /wp-admin4.15 ▲0.8453.28 ▼1.50
Posts /wp-admin/edit.php4.20 ▲0.8457.11 ▲6.67
Add New Post /wp-admin/post-new.php6.75 ▲0.8699.89 ▲5.43
Media Library /wp-admin/upload.php4.07 ▲0.8446.38 ▲8.38
User Reports /wp-admin/admin.php?page=bmp-user-reports3.9840.08
Reset Data /wp-admin/admin.php?page=bmp-reset-data3.9839.63
payout Reports /wp-admin/admin.php?page=bmp-payout-reports3.9842.87
Settings /wp-admin/admin.php?page=bmp-settings4.0843.81

Server storage [IO: ▲1.65MB] [DB: ▲0.03MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 67 new files
Database: 13 new tables, 10 new options
New tables
wp_bmp_referral_commission
wp_bmp_rightposition
wp_bmp_leftposition
wp_bmp_country
wp_bmp_commission
wp_bmp_royalty
wp_bmp_currency
wp_bmp_users
wp_bmp_bonus
wp_bmp_product_price
...
New WordPress options
widget_recent-posts
bmp_register_page_id
widget_recent-comments
widget_theysaidso_widget
bmp_join-network_page_id
can_compress_scripts
db_upgraded
bmp_bmp-acccount-detail_page_id
theysaidso_admin_options
bmp_downlines_page_id

Browser metrics Passed 4 tests

An overview of browser requirements for Binary MLM Plan
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.67 ▼0.581.80 ▲0.1440.98 ▼5.59
Dashboard /wp-admin2,227 ▲455.96 ▲0.15113.58 ▲9.2487.37 ▲47.70
Posts /wp-admin/edit.php2,125 ▲332.07 ▲0.0240.19 ▼5.3430.49 ▼8.75
Add New Post /wp-admin/post-new.php1,698 ▲18422.73 ▲5.19717.94 ▲26.2659.36 ▲3.79
Media Library /wp-admin/upload.php1,491 ▲1034.20 ▼0.0697.98 ▼12.6772.81 ▲22.93
User Reports /wp-admin/admin.php?page=bmp-user-reports9552.2325.1623.85
Reset Data /wp-admin/admin.php?page=bmp-reset-data7982.0325.0622.21
payout Reports /wp-admin/admin.php?page=bmp-payout-reports9422.0825.4822.24
Settings /wp-admin/admin.php?page=bmp-settings9612.0725.5627.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/binary-mlm-plan/includes/classs-bmp-uninstaller.php+36
    session_destroy(): Trying to destroy uninitialized session
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/binary-mlm-plan/templates/bmp-auto-add.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/binary-mlm-plan/includes/admin/settings/payout/view_payout.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/binary-mlm-plan/includes/admin/settings/view/view_eligibility_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/binary-mlm-plan/includes/admin/settings/view/view_product_price_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/binary-mlm-plan/includes/admin/settings/view/view_first_user_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/binary-mlm-plan/includes/admin/settings/view/view_email_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/binary-mlm-plan/includes/admin/settings/view/view_payout_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/binary-mlm-plan/includes/admin/settings/payout/view_distribute_bonus_commission_message.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/binary-mlm-plan/includes/admin/settings/view/view_epin_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/binary-mlm-plan/includes/admin/settings/view/view_royalty_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/binary-mlm-plan/includes/admin/settings/payout/view_distribute_commission_message.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 94% 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 need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #2, #20, #21, #3, #4, #5, #6, #7, #8, #9 in binary-mlm-plan/assets to your readme.txt
You can take inspiration from this readme.txt

binary-mlm-plan/bmp.php 54% from 13 tests

The primary PHP file in "Binary MLM Plan" version 1.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 173 characters long)
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.6" instead of "7.4")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "6.1")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("binary-mlm-plan.php" instead of "bmp.php")
  • Domain Path: The domain path is invalid: folder "/i18n/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin21,959 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,0199111,686
PHP441,2394416,047
JavaScript53486003,938
SVG100288

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity17.88
▷ Minimum class complexity1.00
▷ Maximum class complexity123.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes16.25%
Methods103
▷ Static methods2524.27%
▷ Public methods9693.20%
▷ Protected methods00.00%
▷ Private methods76.80%
Functions107
▷ Named functions107100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/mlm_tree.png0.42KB0.18KB▼ 57.94%
assets/images/logo_white.png2.40KB2.45KB0.00%
image/paid.png1.70KB1.62KB▼ 5.04%
assets/images/logo-white.png2.57KB1.18KB▼ 53.97%
image/unpaid.png2.14KB1.65KB▼ 22.77%