84% team-rosters

Code Review | Team Rosters

WordPress plugin Team Rosters scored84%from 54 tests.

About plugin

  • Plugin page: team-rosters
  • Plugin version: 4.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-6.0.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2012
  • Latest release: Feb 4, 2023
  • Number of updates: 197
  • Update frequency: every 18.9 days
  • Top authors: MarkODonnell (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

400+ active /31,869 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.94MB] [CPU: ▲2.75ms] Passed 4 tests

An overview of server-side resources used by Team Rosters
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5645.98 ▲6.93
Dashboard /wp-admin4.39 ▲1.0461.09 ▼1.30
Posts /wp-admin/edit.php4.45 ▲1.0961.95 ▲11.48
Add New Post /wp-admin/post-new.php6.97 ▲1.08102.54 ▲2.54
Media Library /wp-admin/upload.php4.29 ▲1.0646.07 ▲2.82
Team Rosters /wp-admin/admin.php?page=team-rosters-page4.2848.09
Teams /wp-admin/edit-tags.php?taxonomy=mstw_tr_team&post_type=mstw_tr_player4.3143.95
CSV Import /wp-admin/admin.php?page=mstw-tr-csv-import4.2947.48
Edit Rosters /wp-admin/admin.php?page=manage-team-rosters4.2946.89
Settings /wp-admin/admin.php?page=mstw-tr-settings4.5247.43
Add Players to Rosters /wp-admin/admin.php?page=add-players-screen4.2948.45
Manage Players /wp-admin/edit.php?post_type=mstw_tr_player4.3654.44

Server storage [IO: ▲0.78MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
mstw_tr_options
mstw_team_rosters_activated
widget_theysaidso_widget
widget_recent-comments
mstw_tr_ss_team_links
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Team Rosters
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,066 ▲30515.21 ▲1.067.56 ▲5.6241.02 ▼0.61
Dashboard /wp-admin2,363 ▲1856.16 ▲0.50130.40 ▲26.39121.41 ▲74.66
Posts /wp-admin/edit.php2,319 ▲2193.35 ▲1.3346.26 ▲4.0871.76 ▲36.33
Add New Post /wp-admin/post-new.php1,574 ▲4823.29 ▼0.11601.50 ▼49.6165.31 ▲9.12
Media Library /wp-admin/upload.php1,453 ▲564.09 ▼0.1284.38 ▼26.3983.68 ▲36.20
Team Rosters /wp-admin/admin.php?page=team-rosters-page1,0723.0541.2272.99
Teams /wp-admin/edit-tags.php?taxonomy=mstw_tr_team&post_type=mstw_tr_player1,4943.1949.8175.16
CSV Import /wp-admin/admin.php?page=mstw-tr-csv-import1,2443.0638.9062.56
Edit Rosters /wp-admin/admin.php?page=manage-team-rosters1,0813.0738.5863.55
Settings /wp-admin/admin.php?page=mstw-tr-settings1,9263.4343.7381.53
Add Players to Rosters /wp-admin/admin.php?page=add-players-screen1,0943.0241.6861.24
Manage Players /wp-admin/edit.php?post_type=mstw_tr_player1,4963.3645.5857.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • mstw_tr_ss_team_links
    • mstw_team_rosters_activated
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • mstw_tr_options
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/team-rosters/mstw-team-rosters.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/team-rosters/includes/mstw-tr-admin.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/team-rosters/theme-templates/taxonomy-team.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/team-rosters/includes/mstw-tr-player-cpt-admin.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/team-rosters/theme-templates/single-player.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: rosters, sports team roster, sports, member list, teams...

team-rosters/mstw-team-rosters.php 85% from 13 tests

The main PHP file in "Team Rosters" ver. 4.6 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/lang")
  • Main file name: The principal plugin file should be the same as the plugin slug ("team-rosters.php" instead of "mstw-team-rosters.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected8,094 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP202,1214,7287,064
CSS2170168704
JavaScript11132280326

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity61.40
▷ Minimum class complexity29.00
▷ Maximum class complexity102.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods95
▷ Static methods00.00%
▷ Public methods8993.68%
▷ Protected methods66.32%
▷ Private methods00.00%
Functions150
▷ Named functions150100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.27MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mstw-admin-menu-icon.png51.45KB0.27KB▼ 99.47%
images/default-images/default-logo.png57.04KB1.63KB▼ 97.15%
images/mstw-logo-32x32.png52.27KB0.48KB▼ 99.09%
images/mstw-logo-16x16.png51.45KB0.27KB▼ 99.47%
images/default-images/default-photo.png63.39KB4.79KB▼ 92.44%