67% affiliaa-affiliate-program-with-mlm

Code Review | Affilia Lite - Affiliate Program With MLM

WordPress plugin Affilia Lite - Affiliate Program With MLM scored67%from 54 tests.

About plugin

  • Plugin page: affiliaa-affiliat...
  • Plugin version: 2.5.0
  • PHP compatiblity: 5.6.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2020
  • Latest release: Nov 4, 2023
  • Number of updates: 22
  • Update frequency: every 59.9 days
  • Top authors: redefiningtheweb (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /28,437 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
Install script ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼3.46ms] Passed 4 tests

Server-side resources used by Affilia Lite - Affiliate Program With MLM
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.95 ▼2.95
Dashboard /wp-admin3.38 ▲0.0851.62 ▲3.69
Posts /wp-admin/edit.php3.50 ▲0.1453.30 ▲3.90
Add New Post /wp-admin/post-new.php5.19 ▼0.6968.50 ▼17.39
Media Library /wp-admin/upload.php3.28 ▲0.0635.80 ▲2.82

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 101 new files
Database: 2 new tables, 10 new options
New tables
wp_rtwwwap_mlm
wp_rtwwwap_referrals
New WordPress options
widget_theysaidso_widget
customize_email
widget_recent-comments
rtwwwap_affiliate_page_id
rtwalwm_db_version
widget_recent-posts
theysaidso_admin_options
db_upgraded
rtwalwm_affiliate_lite
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Affilia Lite - Affiliate Program With MLM
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,100 ▲33816.11 ▲1.7819.45 ▲17.7536.23 ▼8.88
Dashboard /wp-admin2,346 ▲1696.11 ▲0.53115.89 ▲14.3086.11 ▲42.10
Posts /wp-admin/edit.php2,268 ▲1683.35 ▲1.3352.76 ▲15.2068.72 ▲33.18
Add New Post /wp-admin/post-new.php6,242 ▲4,71625.87 ▲2.82892.65 ▲264.3839.09 ▼4.92
Media Library /wp-admin/upload.php1,405 ▲54.05 ▼0.1080.92 ▼23.0986.40 ▲42.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_rtwwwap_mlm
    • wp_rtwwwap_referrals
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • customize_email
    • rtwwwap_affiliate_page_id
    • widget_recent-posts
    • theysaidso_admin_options
    • rtwalwm_affiliate_lite
    • db_upgraded
    • rtwalwm_db_version
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/affiliaa-affiliate-program-with-mlm/public/partials/rtwalwm-wp-wc-affiliate-program-public-display.php
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm_tabs/rtwalwm_customize_email.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm_tabs/rtwalwm_mlm.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm_tabs/rtwalwm_levels_add_edit.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm_tabs/rtwalwm_extra_features.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm_tabs/rtwalwm_affiliates.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm_tabs/rtwalwm_custom_banner.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm_tabs/rtwalwm_dashboard.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm_tabs/rtwalwm_addons.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm-wp-wc-affiliate-program-admin-display.php:92
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/affiliaa-affiliate-program-with-mlm/admin/partials/rtwalwm_tabs/rtwalwm_referrals.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt might help

affiliaa-affiliate-program-with-mlm/wp-wc-affiliate-program.php 77% from 13 tests

The entry point to "Affilia Lite - Affiliate Program With MLM" version 2.5.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "4.2.0")
  • 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: The principal plugin file should be the same as the plugin slug ("affiliaa-affiliate-program-with-mlm.php" instead of "wp-wc-affiliate-program.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected21,076 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript122,6177,62810,848
CSS102702985,135
PHP288666415,093

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity42.67
▷ Minimum class complexity1.00
▷ Maximum class complexity137.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods67
▷ Static methods11.49%
▷ Public methods6292.54%
▷ Protected methods00.00%
▷ Private methods57.46%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
32 PNG files occupy 0.20MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/affiliate-menu-icon.png4.14KB0.84KB▼ 79.75%
assets/images/extra_feature.png4.09KB1.40KB▼ 65.74%
assets/images/affiliate.png6.38KB2.08KB▼ 67.44%
assets/Datatables/images/sort_asc_disabled.png0.14KB0.25KB0.00%
assets/images/email52.png0.55KB0.61KB0.00%