90% sportsteam-widget

Code Review | Sportsteam Widget - Football livescore

WordPress plugin Sportsteam Widget - Football livescore scored90%from 54 tests.

About plugin

  • Plugin page: sportsteam-widget
  • Plugin version: 2.4.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.4
  • WordPress version: 6.3.1
  • First release: Mar 6, 2015
  • Latest release: Nov 23, 2023
  • Number of updates: 92
  • Update frequency: every 34.6 days
  • Top authors: mpol (91.3%)wpsports (9.78%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /9,251 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.20MB] [CPU: ▼0.28ms] Passed 4 tests

This is a short check of server-side resources used by Sportsteam Widget - Football livescore
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2242.40 ▼0.12
Dashboard /wp-admin3.51 ▲0.2048.22 ▼1.56
Posts /wp-admin/edit.php3.62 ▲0.2650.65 ▲0.38
Add New Post /wp-admin/post-new.php6.09 ▲0.2094.87 ▲7.84
Media Library /wp-admin/upload.php3.43 ▲0.2036.67 ▲0.20
SportsTeams /wp-admin/edit.php?post_type=sportsteams3.4737.81
New Team /wp-admin/post-new.php?post_type=sportsteams3.6652.85
Livescore New! /wp-admin/edit.php?post_type=sportsteams&page=sportsteam-widget/src/Sprttm_ShortCodeConfig.php3.4336.40
About /wp-admin/edit.php?post_type=sportsteams&page=sportsteam_about3.4030.06
Classes /wp-admin/edit-tags.php?taxonomy=st_classes&post_type=sportsteams3.5535.83

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_sprttm_sportsteam
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Sportsteam Widget - Football livescore
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲10314.58 ▼0.102.19 ▲0.5939.20 ▼5.69
Dashboard /wp-admin2,239 ▲685.60 ▼0.0595.78 ▼2.4339.19 ▼8.33
Posts /wp-admin/edit.php2,141 ▲381.95 ▼0.0540.85 ▼1.8637.02 ▼0.02
Add New Post /wp-admin/post-new.php1,560 ▲2623.52 ▲0.28685.79 ▲89.7656.85 ▼11.03
Media Library /wp-admin/upload.php1,438 ▲414.20 ▲0.02101.50 ▲0.0142.62 ▲2.82
SportsTeams /wp-admin/edit.php?post_type=sportsteams1,1051.9133.2331.81
New Team /wp-admin/post-new.php?post_type=sportsteams2,4997.61178.4067.11
Livescore New! /wp-admin/edit.php?post_type=sportsteams&page=sportsteam-widget/src/Sprttm_ShortCodeConfig.php2,1202.0025.0950.27
About /wp-admin/edit.php?post_type=sportsteams&page=sportsteam_about8431.9727.1727.13
Classes /wp-admin/edit-tags.php?taxonomy=st_classes&post_type=sportsteams1,3122.1327.6230.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_sprttm_sportsteam
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt is a good inspiration

sportsteam-widget/sportsteam-widget.php Passed 13 tests

"Sportsteam Widget - Football livescore" version 2.4.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
84 characters long description:
A widget that shows the next match of a team and shortcodes for football livescores.

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
There were no executable files found in this plugin1,084 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP51205371,026
CSS111458

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity23.00
▷ Minimum class complexity7.00
▷ Maximum class complexity39.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/separator.png0.57KB0.61KB0.00%