10% victorious

Code Review | Victorious

WordPress plugin Victorious scored10%from 54 tests.

About plugin

  • Plugin page: victorious
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2023
  • Latest release: Sep 14, 2023
  • Number of updates: 13
  • Update frequency: every 18.8 days
  • Top authors: victoriousclub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /494 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲1.86MB] [CPU: ▲606.72ms] 50% from 4 tests

This is a short check of server-side resources used by Victorious
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 2,404.95ms on /wp-admin/admin.php?page=manage-playernews)
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 606.72ms on /wp-admin/admin.php?page=manage-playernews)
PageMemory (MB)CPU Time (ms)
Home /5.56 ▲2.0960.25 ▲15.51
Dashboard /wp-admin5.16 ▲1.81834.95 ▲768.33
Posts /wp-admin/edit.php5.19 ▲1.83875.53 ▲824.74
Add New Post /wp-admin/post-new.php7.84 ▲1.951,097.54 ▲999.62
Media Library /wp-admin/upload.php5.10 ▲1.86857.00 ▲818.29
Fighters /wp-admin/admin.php?page=manage-fighters5.852,373.86
Add Player News /wp-admin/admin.php?page=add-playernews5.801,630.91
Event Statistics /wp-admin/admin.php?page=statistic5.862,378.98
Add Events /wp-admin/admin.php?page=add-pools5.811,602.72
Sports /wp-admin/admin.php?page=manage-sports5.862,413.49
Player Positions /wp-admin/admin.php?page=manage-playerposition5.852,346.50
Credits /wp-admin/admin.php?page=credits5.873,159.86
Players /wp-admin/admin.php?page=manage-players5.832,394.16
Withdrawls /wp-admin/admin.php?page=withdrawls5.871,554.95
Player News /wp-admin/admin.php?page=manage-playernews5.852,404.95

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 593 new files
Database: 8 new tables, 41 new options
New tables
wp_fundhistory
wp_vic_balance_types
wp_firebase_tokens
wp_user_teams
wp_user_payment
wp_withdrawls
wp_vic_balances
wp_user_extended
New WordPress options
victorious_third_place_percent
victorious_paypal_pro_username
victorious_entry_fee
victorious_share_teams_players
victorious_first_place_percent
victorious_fee_percentage
db_upgraded
victorious_facebook_app_id
victorious_create_contest
victorious_currency
...

Browser metrics Passed 4 tests

Checking browser requirements for Victorious
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲20813.43 ▼0.9210.18 ▲8.0828.00 ▼15.85
Dashboard /wp-admin2,281 ▲1015.55 ▼0.0383.87 ▼4.6947.94 ▲8.33
Posts /wp-admin/edit.php2,189 ▲862.01 ▼0.0236.85 ▼4.4239.21 ▼0.13
Add New Post /wp-admin/post-new.php1,597 ▲7023.24 ▲0.16647.45 ▼41.4059.05 ▼8.57
Media Library /wp-admin/upload.php1,486 ▲894.26 ▲0.08102.47 ▼7.8850.38 ▼0.32
Fighters /wp-admin/admin.php?page=manage-fighters1,0201.7024.5839.80
Add Player News /wp-admin/admin.php?page=add-playernews8931.9027.9934.55
Event Statistics /wp-admin/admin.php?page=statistic1,0442.0927.7738.20
Add Events /wp-admin/admin.php?page=add-pools8981.9127.2034.38
Sports /wp-admin/admin.php?page=manage-sports1,0362.0928.3833.85
Player Positions /wp-admin/admin.php?page=manage-playerposition1,0231.8525.6137.03
Credits /wp-admin/admin.php?page=credits1,1232.0728.4844.90
Players /wp-admin/admin.php?page=manage-players9201.7225.5736.55
Withdrawls /wp-admin/admin.php?page=withdrawls1,0482.1129.1935.77
Player News /wp-admin/admin.php?page=manage-playernews1,0221.7325.0941.25

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
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_vic_balance_types
    • wp_user_teams
    • wp_vic_balances
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-playernews
    • > Notice in wp-content/plugins/victorious/model/admin/playernews.php+8
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 9× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/victorious/views/Elements/live_point.php
    • > /wp-content/plugins/victorious/views/Elements/user_summary.php
    • > /wp-content/plugins/victorious/views/Elements/contest_detail_tab_prize.php
    • > /wp-content/plugins/victorious/views/block/userbalance.html.php
    • > /wp-content/plugins/victorious/views/dlg_info.php
    • > /wp-content/plugins/victorious/views/Elements/dashboard_stats_chart.php
    • > /wp-content/plugins/victorious/views/live_score.php
    • > /wp-content/plugins/victorious/views/Elements/qq_template.php
    • > /wp-content/plugins/victorious/views/Elements/paypal_normal.php
  • 484× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'VIC_Model' not found in wp-content/plugins/victorious/model/admin/players.php:2
    • > PHP Warning
      require_once(VICTORIOUS__PLUGIN_DIR_VIEW_ELEMENTpick_header.php): failed to open stream: No such file or directory in wp-content/plugins/victorious/views/Elements/gametype/pickem.php on line 2
    • > PHP Notice
      Undefined variable: league in wp-content/plugins/victorious/views/Elements/contest_picks.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/victorious/views/Elements/portfolio/leaderboard_detail.php:7
    • > PHP Notice
      Undefined variable: scoringCats in wp-content/plugins/victorious/views/Elements/result/playerdraft.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/victorious/views/Elements/playerdraft/leaderboard_detail.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/victorious/model/admin/emailTemplates/live_draft_reject_trade_player.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/victorious/views/Elements/livescore/schedule.php:122
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/victorious/model/admin/emailTemplates/live_draft_request_trade_player.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/victorious/views/Elements/bracket/result_detail.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === victorious === )
You can look at the official readme.txt

victorious/victorious.php 92% from 13 tests

The main file in "Victorious" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 716 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please make sure to remedy the following
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/victorious/model/api_cert_chain.crt
98,802 lines of code in 477 files:
LanguageFilesBlank linesComment linesLines of code
CSS2728951140,900
PHP3593,9463,00038,153
JavaScript551,3158,69416,112
Sass1323241,256
LESS1323331,247
SVG200539
Markdown31170479
JSON200113
XML3003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity37.13
▷ Minimum class complexity1.00
▷ Maximum class complexity724.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes101
▷ Abstract classes00.00%
▷ Concrete classes101100.00%
▷ Final classes00.00%
Methods1,508
▷ Static methods45229.97%
▷ Public methods1,30086.21%
▷ Protected methods161.06%
▷ Private methods19212.73%
Functions79
▷ Named functions6075.95%
▷ Anonymous functions1924.05%
Constants111
▷ Global constants10998.20%
▷ Class constants21.80%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
76 PNG files occupy 7.91MB with 1.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_inc/image/gamble.png1.01KB1.15KB0.00%
_inc/css/images/M.png0.60KB0.45KB▼ 25.49%
_inc/image/dfscoin.png22.31KB20.83KB▼ 6.64%
_inc/image/molpay.png2.45KB2.26KB▼ 7.62%
assets/screenshot-1.png254.27KB80.36KB▼ 68.40%