67% unilevel-mlm-plan

Code Review | Unilevel MLM Plan

WordPress plugin Unilevel MLM Plan scored67%from 54 tests.

About plugin

  • Plugin page: unilevel-mlm-plan
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-5.6
  • WordPress version: 6.3.1
  • First release: Sep 22, 2019
  • Latest release: May 13, 2023
  • Number of updates: 8
  • Update frequency: every 166.1 days
  • Top authors: letscms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /8,273 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.15ms] Passed 4 tests

An overview of server-side resources used by Unilevel MLM Plan
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.19 ▼4.44
Dashboard /wp-admin3.35 ▲0.0550.16 ▲3.46
Posts /wp-admin/edit.php3.47 ▲0.1154.85 ▼2.99
Add New Post /wp-admin/post-new.php5.95 ▲0.07105.23 ▲2.73
Media Library /wp-admin/upload.php3.28 ▲0.0531.42 ▲0.10
Settings /wp-admin/admin.php?page=ump-settings3.3233.51
ePin Reports /wp-admin/admin.php?page=ump-epin-reports3.2534.77
Upgrade Plugin /wp-admin/admin.php?page=ump-upgrade3.2431.32

Server storage [IO: ▲0.73MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 35 new files
Database: 5 new tables, 8 new options
New tables
wp_ump_users
wp_ump_epins
wp_ump_currency
wp_ump_hierarchy
wp_ump_country
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
ump_register_page_id
widget_theysaidso_widget
ump_downlines_page_id
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Unilevel MLM Plan
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10413.77 ▼0.604.78 ▲2.6432.56 ▼7.56
Dashboard /wp-admin2,230 ▲394.91 ▼0.01111.13 ▲1.6085.05 ▲41.00
Posts /wp-admin/edit.php2,129 ▲372.06 ▲0.0642.85 ▲5.1741.04 ▲0.24
Add New Post /wp-admin/post-new.php1,707 ▲16023.70 ▲5.62759.04 ▲65.9674.54 ▲15.81
Media Library /wp-admin/upload.php1,421 ▲334.21 ▼0.06127.82 ▲17.2278.82 ▲29.46
Settings /wp-admin/admin.php?page=ump-settings2,5552.3939.1646.29
ePin Reports /wp-admin/admin.php?page=ump-epin-reports9741.7032.2938.59
Upgrade Plugin /wp-admin/admin.php?page=ump-upgrade8072.0429.8932.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'uninstall' not found or invalid function name
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/unilevel-mlm-plan/includes/admin/settings/view/general-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/unilevel-mlm-plan/includes/admin/settings/view/settings-left-section.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/unilevel-mlm-plan/includes/admin/settings/view/create-first-user.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/unilevel-mlm-plan/includes/admin/settings/view/create-first-user.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/unilevel-mlm-plan/includes/admin/settings/view/epins-settings.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ump-upgrade
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).popover is not a function" "TypeError: $(...).popover is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/unilevel-mlm-plan/assets/js/admin.js?ver=6.3.1:37:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ump-upgrade
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).popover is not a function

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in unilevel-mlm-plan/assets to your readme.txt
You can look at the official readme.txt

unilevel-mlm-plan/ump.php 62% from 13 tests

The principal PHP file in "Unilevel MLM Plan" v. 1.1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.0" instead of "7.4")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: The required version number must match the one declared in readme.txt ("5.3" instead of "6.1")
  • Domain Path: The domain path folder was not found ("/i18n/languages/")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("unilevel-mlm-plan.php" instead of "ump.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin14,950 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,238179,233
JavaScript58673493,468
PHP203641722,249

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.44
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods49
▷ Static methods1428.57%
▷ Public methods4387.76%
▷ Protected methods00.00%
▷ Private methods612.24%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/user.png18.12KB7.71KB▼ 57.46%
image/mlm_tree.png0.42KB0.18KB▼ 57.94%
image/user_paid.png18.81KB7.78KB▼ 58.62%
assets/images/logo-white.png2.57KB1.18KB▼ 53.97%
assets/images/logo_white.png2.40KB2.45KB0.00%