84% detailed-player-stats-for-sportspress

Code Review | Detailed Player Stats for SportsPress

WordPress plugin Detailed Player Stats for SportsPress scored84%from 54 tests.

About plugin

  • Plugin page: detailed-player-s...
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Oct 13, 2021
  • Latest release: Mar 31, 2023
  • Number of updates: 21
  • Update frequency: every 30.8 days
  • Top authors: savvasha (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,429 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.03ms] Passed 4 tests

A check of server-side resources used by Detailed Player Stats for SportsPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.94 ▼0.21
Dashboard /wp-admin3.38 ▲0.0444.76 ▼13.53
Posts /wp-admin/edit.php3.44 ▲0.0746.78 ▼1.54
Add New Post /wp-admin/post-new.php5.97 ▲0.0885.98 ▼0.83
Media Library /wp-admin/upload.php3.31 ▲0.0737.82 ▲4.25

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Detailed Player Stats for SportsPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.022.08 ▼0.1541.79 ▼8.66
Dashboard /wp-admin2,203 ▲215.79 ▲0.9395.44 ▼25.0541.23 ▼2.19
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0439.23 ▲0.6734.70 ▼0.83
Add New Post /wp-admin/post-new.php1,538 ▲523.22 ▼0.22588.99 ▼84.5252.99 ▲3.87
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0498.92 ▼10.2044.76 ▼1.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/detailed-player-stats-for-sportspress/templates/player-statistics-league.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/detailed-player-stats-for-sportspress/includes/class-dpsfs-scripts.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: sportspress, stats, events, statistics, season...

detailed-player-stats-for-sportspress/detailed-player-stats-for-sportspress.php Passed 13 tests

The main PHP script in "Detailed Player Stats for SportsPress" version 1.6.0 is automatically included on every request by WordPress
45 characters long description:
An advanced player per season stats template.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin627 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5111148521
JavaScript19670
CSS14036

PHP code Passed 2 tests

A short 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.54
Average class complexity29.50
▷ Minimum class complexity4.00
▷ Maximum class complexity55.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods866.67%
▷ Protected methods00.00%
▷ Private methods433.33%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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
4 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png37.78KB14.93KB▼ 60.47%
screenshot-2.png33.02KB15.70KB▼ 52.45%
screenshot-4.png11.28KB6.49KB▼ 42.44%
screenshot-3.png41.91KB20.03KB▼ 52.20%