84% bet-sport-free

Code Review | Bet sport Free

WordPress plugin Bet sport Free scored84%from 54 tests.

About plugin

  • Plugin page: bet-sport-free
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2023
  • Latest release: Jul 28, 2023
  • Number of updates: 4
  • Update frequency: every 2.5 days
  • Top authors: elmervillanueva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /91 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.16ms] Passed 4 tests

Server-side resources used by Bet sport Free
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.77 ▼1.49
Dashboard /wp-admin3.39 ▲0.0847.48 ▼4.45
Posts /wp-admin/edit.php3.44 ▲0.0849.18 ▼0.15
Add New Post /wp-admin/post-new.php5.99 ▲0.1091.72 ▼8.04
Media Library /wp-admin/upload.php3.31 ▲0.0837.13 ▼2.64
Leagues /wp-admin/admin.php?page=bet-plugin-leagues3.3334.74
Bets /wp-admin/admin.php?page=bet-plugin-bets3.3330.96
Teams /wp-admin/admin.php?page=bet-plugin-em3.3337.06
Matches /wp-admin/admin.php?page=bet-plugin-matches3.3337.41
Settings /wp-admin/admin.php?page=bet-plugin-settings3.2831.43

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
em_bet_seed

Browser metrics Passed 4 tests

An overview of browser requirements for Bet sport Free
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲5714.31 ▼0.351.81 ▼0.1345.07 ▲0.57
Dashboard /wp-admin2,242 ▲685.70 ▲0.0886.85 ▼4.1880.08 ▲37.62
Posts /wp-admin/edit.php2,147 ▲472.03 ▲0.0539.24 ▲0.6337.08 ▲2.03
Add New Post /wp-admin/post-new.php1,578 ▲5218.39 ▼5.04672.90 ▲7.9756.25 ▲4.37
Media Library /wp-admin/upload.php1,447 ▲474.27 ▲0.02101.83 ▼4.5365.91 ▲22.17
Leagues /wp-admin/admin.php?page=bet-plugin-leagues1,0212.0532.2229.05
Bets /wp-admin/admin.php?page=bet-plugin-bets9412.0527.5425.83
Teams /wp-admin/admin.php?page=bet-plugin-em1,0842.0626.3428.39
Matches /wp-admin/admin.php?page=bet-plugin-matches1,0802.2025.2927.95
Settings /wp-admin/admin.php?page=bet-plugin-settings8382.0123.4927.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • em_bet_seed

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/bet-sport-free/Inc/class-Teams.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/bet-sport-free/Inc/class-Leagues.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/bet-sport-free/Inc/class-Bets.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/bet-sport-free/Inc/class-Matches.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BetPlugin\\plugins_url() in wp-content/plugins/bet-sport-free/app.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in bet-sport-free/assets to your readme.txt
The official readme.txt might help

bet-sport-free/app.php 92% from 13 tests

Analyzing the main PHP file in "Bet sport Free" version 1.0.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bet-sport-free.php" instead of "app.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,336 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP19213731,332
CSS2002
JavaScript2002

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.33
Average class complexity9.12
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods89
▷ Static methods00.00%
▷ Public methods89100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo_menu.png1.54KB1.38KB▼ 10.41%