83% ibet-odds-payout-calculator

Code Review | iBET Odds Payout Calculator

WordPress plugin iBET Odds Payout Calculator scored83%from 54 tests.

About plugin

  • Plugin page: ibet-odds-payout-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.0
  • WordPress version: 6.3.1
  • First release: Dec 28, 2018
  • Latest release: Jan 11, 2019
  • Number of updates: 8
  • Update frequency: every 1.8 days
  • Top authors: ibet6888 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,229 total downloads

Benchmarks

Plugin footprint 83% 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.11MB] [CPU: ▼3.30ms] Passed 4 tests

This is a short check of server-side resources used by iBET Odds Payout Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1140.14 ▼0.32
Dashboard /wp-admin3.42 ▲0.1144.76 ▼3.33
Posts /wp-admin/edit.php3.47 ▲0.1146.19 ▲0.81
Add New Post /wp-admin/post-new.php6.00 ▲0.1189.34 ▼6.34
Media Library /wp-admin/upload.php3.34 ▲0.1132.37 ▼3.21

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_ibet_odds_payout_calculator
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for iBET Odds Payout Calculator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.25 ▼1.344.39 ▲2.5543.41 ▼9.21
Dashboard /wp-admin2,206 ▲144.82 ▼0.0897.41 ▼11.1437.87 ▼7.70
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0238.50 ▼4.9932.06 ▼1.85
Add New Post /wp-admin/post-new.php1,543 ▲2918.47 ▲0.93660.27 ▲5.2168.89 ▲9.28
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.0495.21 ▼11.7740.81 ▼4.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_ibet_odds_payout_calculator

Smoke tests 75% 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 50% 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ibet-odds-payout-calculator/widget_init.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (screenshot-1.png) image not found
You can take inspiration from this readme.txt

ibet-odds-payout-calculator/widget_init.php 77% from 13 tests

The main PHP script in "iBET Odds Payout Calculator" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 313 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ibet-odds-payout-calculator.php" instead of "widget_init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,673 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JSON11002,079
PHP478120576
CSS11012
JavaScript2596

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.07
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png8.52KB3.21KB▼ 62.35%