83% sports-rankings-lists

Code Review | Sports Rankings and Lists

WordPress plugin Sports Rankings and Lists scored83%from 54 tests.

About plugin

  • Plugin page: sports-rankings-l...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0.2
  • WordPress version: 6.3.1
  • First release: Aug 12, 2013
  • Latest release: Sep 21, 2022
  • Number of updates: 26
  • Update frequency: every 128.4 days
  • Top authors: kutu62 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /13,213 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼11.34ms] Passed 4 tests

This is a short check of server-side resources used by Sports Rankings and Lists
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.34 ▼3.51
Dashboard /wp-admin3.36 ▲0.0650.35 ▼0.51
Posts /wp-admin/edit.php3.41 ▲0.0651.86 ▼16.05
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.67 ▼25.28
Media Library /wp-admin/upload.php3.28 ▲0.0638.59 ▲3.03
Lists /wp-admin/edit.php?post_type=player_list3.3340.33
Ranker Settings /wp-admin/admin.php?page=ranker_settings3.2531.23
Rankers /wp-admin/edit.php?post_type=ranker3.3334.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sports Rankings and Lists
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.34 ▼0.071.82 ▲0.0744.42 ▼1.32
Dashboard /wp-admin2,224 ▲475.59 ▼0.0286.73 ▼8.2179.18 ▲33.96
Posts /wp-admin/edit.php2,162 ▲592.48 ▲0.4437.70 ▼3.5933.81 ▼2.12
Add New Post /wp-admin/post-new.php1,569 ▲4323.77 ▲0.82732.55 ▲82.9055.46 ▲3.63
Media Library /wp-admin/upload.php1,448 ▲574.27 ▲0.09116.94 ▲12.4176.98 ▲30.62
Lists /wp-admin/edit.php?post_type=player_list1,1372.1931.5530.35
Ranker Settings /wp-admin/admin.php?page=ranker_settings8901.9129.6529.35
Rankers /wp-admin/edit.php?post_type=ranker1,1502.2136.3829.96

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      fopen(): Filename cannot be empty in wp-content/plugins/sports-rankings-lists/import_players.php on line 2
    • > PHP Notice
      Undefined index: url in wp-content/plugins/sports-rankings-lists/import_players.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sports-rankings-lists/wp-ranking.php:88
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sports-rankings-lists/admin.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (19 tag instead of maximum 10)
You can look at the official readme.txt

sports-rankings-lists/wp-ranking.php 85% from 13 tests

The main PHP script in "Sports Rankings and Lists" version 2.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 223 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sports-rankings-lists.php" instead of "wp-ranking.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected798 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3542584
PO File17171161
CSS28037
JavaScript11016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/drag.png2.96KB0.39KB▼ 86.80%
images/icon_16.png0.51KB0.53KB0.00%
images/icon_32.png1.04KB1.19KB0.00%