72% woo-binary-mlm

Code Review | Binary MLM Woocommerce

WordPress plugin Binary MLM Woocommerce scored72%from 54 tests.

About plugin

  • Plugin page: woo-binary-mlm
  • Plugin version: 1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: May 14, 2023
  • Number of updates: 48
  • Update frequency: every 32.2 days
  • Top authors: letscms (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /13,354 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼13.18MB] [CPU: ▼2,734,928.85ms] Passed 4 tests

A check of server-side resources used by Binary MLM Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▼52.7466.28 ▼10,939,712.47
Dashboard /wp-admin56.26 ▲52.9110,948,958.18 ▲10,948,900.60
Posts /wp-admin/edit.php3.40 ▲0.0051.69 ▼0.65
Add New Post /wp-admin/post-new.php5.93 ▲0.0086.89 ▼9.72
Media Library /wp-admin/upload.php3.27 ▲0.0042.21 ▲7.45

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

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

Browser metrics Passed 4 tests

Binary MLM Woocommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.33 ▼0.021.98 ▲0.3437.05 ▼4.01
Dashboard /wp-admin2,198 ▲185.62 ▼0.0488.30 ▼1.3939.70 ▼4.75
Posts /wp-admin/edit.php2,097 ▼31.99 ▲0.0239.41 ▲3.0736.57 ▼2.51
Add New Post /wp-admin/post-new.php1,526 ▼023.61 ▲0.39664.19 ▲34.5152.65 ▼7.65
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.04100.75 ▼5.4148.05 ▲0.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/woo-binary-mlm/includes/uninstaller.php+34
    session_destroy(): Trying to destroy uninitialized session
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
  • 32× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > 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/woo-binary-mlm/includes/admin/member-list-table.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/woo-binary-mlm/includes/admin/member-list-table.php on line 3
    • > PHP Fatal error
      Trait 'Letscms_BMW_CommonClass' not found in wp-content/plugins/woo-binary-mlm/includes/admin/bmw_member/member-dashboard.php on line 2
    • > PHP Fatal error
      Trait 'Letscms_BMW_CommonClass' not found in wp-content/plugins/woo-binary-mlm/includes/admin/payout/payout-report.php on line 2
    • > PHP Fatal error
      Trait 'Letscms_BMW_CommonClass' not found in wp-content/plugins/woo-binary-mlm/includes/catalog/mydownlines.php on line 2
    • > PHP Fatal error
      Trait 'Letscms_BMW_CommonClass' not found in wp-content/plugins/woo-binary-mlm/includes/catalog/join-network.php on line 2
    • > PHP Fatal error
      Trait 'Letscms_BMW_CommonClass' not found in wp-content/plugins/woo-binary-mlm/includes/order.php on line 2
    • > PHP Fatal error
      Trait 'Letscms_BMW_CommonClass' not found in wp-content/plugins/woo-binary-mlm/includes/ajax-function.php on line 2
    • > PHP Fatal error
      Trait 'Letscms_BMW_CommonClass' not found in wp-content/plugins/woo-binary-mlm/includes/admin/payout/payout-money.php on line 5
    • > PHP Fatal error
      Trait 'Letscms_BMW_CommonClass' not found in wp-content/plugins/woo-binary-mlm/includes/admin/bmw_member/member-unpaid.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
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, #22, #23, #24, #25, #26, #27, #28, #3, #4, #5, #6, #7, #8, #9 in woo-binary-mlm/assets to your readme.txt
The official readme.txt might help

woo-binary-mlm/binarymlm-woocommerce.php 62% from 13 tests

"Binary MLM Woocommerce" version 1.1'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:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.4" instead of "7.4")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "6.1")
  • Domain Path: The domain path points to a folder that does not exist ("/i18n/languages/")
  • 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 ("woo-binary-mlm.php" instead of "binarymlm-woocommerce.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin54,674 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
CSS63,1535628,057
JavaScript105,1283,78621,435
PHP427223395,182

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity20.59
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity6.03
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes12.63%
Methods152
▷ Static methods117.24%
▷ Public methods14595.39%
▷ Protected methods00.00%
▷ Private methods74.61%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/unpaid.png2.14KB1.65KB▼ 22.77%
assets/images/mlm_tree.png0.42KB0.18KB▼ 57.94%
assets/images/admin/view.png0.94KB0.85KB▼ 9.42%
assets/images/tree.png1.70KB1.62KB▼ 5.04%