83% fa-sport-odds

Code Review | FA Sport Odds

WordPress plugin FA Sport Odds scored83%from 54 tests.

About plugin

  • Plugin page: fa-sport-odds
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5.3
  • WordPress version: 6.3.1
  • First release: Jun 11, 2016
  • Latest release: Jun 28, 2016
  • Number of updates: 6
  • Update frequency: every 3.0 days
  • Top authors: betfinal (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active /4,988 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▼8.27ms] Passed 4 tests

Server-side resources used by FA Sport Odds
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2035.41 ▼6.54
Dashboard /wp-admin3.51 ▲0.1644.87 ▼21.81
Posts /wp-admin/edit.php3.62 ▲0.2647.73 ▲2.80
Add New Post /wp-admin/post-new.php6.11 ▲0.2292.65 ▲3.53
Media Library /wp-admin/upload.php3.43 ▲0.2034.68 ▼7.53
Odds Translation /wp-admin/options-general.php?page=odds-translation-page3.4028.90
FA Sport Odds MyAccount /wp-admin/options-general.php?page=fa-odds-account-page3.3731.35

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_fa_sportodds_odds
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
fa-sport-odds
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

FA Sport Odds: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲16413.53 ▼1.058.67 ▲6.8441.59 ▲2.66
Dashboard /wp-admin2,231 ▲435.84 ▼0.0696.94 ▼19.2038.90 ▼4.17
Posts /wp-admin/edit.php2,116 ▲272.03 ▲0.0342.06 ▲4.6135.74 ▲1.14
Add New Post /wp-admin/post-new.php1,555 ▲2218.24 ▼4.75596.88 ▼159.4164.82 ▲8.76
Media Library /wp-admin/upload.php1,410 ▲194.21 ▼0.02101.30 ▼14.9343.40 ▼3.57
Odds Translation /wp-admin/options-general.php?page=odds-translation-page9092.0326.4927.15
FA Sport Odds MyAccount /wp-admin/options-general.php?page=fa-odds-account-page9262.0525.1835.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_fa_sportodds_odds
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=odds-translation-page
    • > Notice in wp-content/plugins/fa-sport-odds/fa-odds-translation.php+23
    Undefined variable: where
    • > GET request to /wp-admin/options-general.php?page=odds-translation-page
    • > Notice in wp-content/plugins/fa-sport-odds/fa-odds-translation.php+82
    Undefined index: s
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fa-odds-account-page
    • > Notice in wp-content/plugins/fa-sport-odds/fa-sport-odds.php+264
    Undefined index: status
    • > GET request to /wp-admin/options-general.php?page=fa-odds-account-page
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 90% 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 to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

fa-sport-odds/fa-sport-odds.php 85% from 13 tests

The main PHP file in "FA Sport Odds" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 230 characters long)
  • Domain Path: The domain path folder does not exist ("/languages/")

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
Success! There were no dangerous files found in this plugin1,162 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP520214808
JavaScript32720210
CSS1111144

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity30.00
▷ Minimum class complexity4.00
▷ Maximum class complexity60.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1856.25%
▷ Public methods2990.62%
▷ Protected methods00.00%
▷ Private methods39.38%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/sports_icons_sprite.png49.36KB12.72KB▼ 74.22%