83% webeki-basketball-widgets-basketball-results-rankings

Code Review | Basketball Widgets - Basketball Results & Rankings

WordPress plugin Basketball Widgets - Basketball Results & Rankings scored83%from 54 tests.

About plugin

  • Plugin page: webeki-basketball...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Jul 31, 2023
  • Latest release: Jul 31, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: nvmnewvision (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /79 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼10.61ms] Passed 4 tests

Server-side resources used by Basketball Widgets - Basketball Results & Rankings
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.76 ▲3.76
Dashboard /wp-admin3.40 ▲0.0650.48 ▼17.28
Posts /wp-admin/edit.php3.52 ▲0.1649.23 ▼6.35
Add New Post /wp-admin/post-new.php6.00 ▲0.1290.13 ▼18.28
Media Library /wp-admin/upload.php3.33 ▲0.1038.84 ▼0.54
Customization /wp-admin/admin.php?page=wbs-widget-customize3.4337.78
Basketball Widgets /wp-admin/admin.php?page=wbs-basket-scores-widget3.4936.56

Server storage [IO: ▲0.07MB] [DB: ▲0.05MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: 2 new tables, 6 new options
New tables
wp_ce_bswidget_leagues
wp_ce_bswidget_teams
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Basketball Widgets - Basketball Results & Rankings
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲8514.20 ▼0.171.90 ▼0.1743.82 ▲3.20
Dashboard /wp-admin2,225 ▲455.58 ▼0.0782.33 ▼8.3977.44 ▲39.05
Posts /wp-admin/edit.php2,133 ▲332.01 ▲0.0537.72 ▼0.1834.37 ▼3.29
Add New Post /wp-admin/post-new.php1,552 ▲2422.96 ▼0.25768.80 ▲87.7860.67 ▲10.48
Media Library /wp-admin/upload.php1,430 ▲304.26 ▲0.0993.90 ▼25.5574.18 ▲28.26
Customization /wp-admin/admin.php?page=wbs-widget-customize1,3002.0223.2740.47
Basketball Widgets /wp-admin/admin.php?page=wbs-basket-scores-widget2,1552.0226.6529.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=wbs-widget-customize
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wbs-widget-customize 155 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=wbs-widget-customize
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wbs-widget-customize 158 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=wbs-widget-customize
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wbs-widget-customize 165 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=wbs-widget-customize
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wbs-widget-customize 168 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=wbs-widget-customize
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wbs-widget-customize 175 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=wbs-widget-customize
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wbs-widget-customize 178 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: Please take inspiration from this readme.txt

webeki-basketball-widgets-basketball-results-rankings/BasketScores-widget.php 85% from 13 tests

The primary PHP file in "Basketball Widgets - Basketball Results & Rankings" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("webeki-basketball-widgets-basketball-results-rankings.php" instead of "BasketScores-widget.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 204 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected518 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP43521363
JavaScript1170115
CSS26040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.00
▷ Minimum class complexity9.00
▷ Maximum class complexity33.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods1055.56%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.86KB0.86KB0.23%