Sportstats Cup Generator

Description

Sportstats Cup Generator lets a sports club, workplace, or hobby league run its own cup or league entirely from the WordPress admin: add participants, generate a bracket, fixture list, or group draw, enter results as they come in, and share a live, always-up-to-date bracket, standings table, and schedule with everyone else.

Features

  • Single elimination (knockout) brackets with proper tournament seeding and automatic bye handling for any number of participants
  • Round-robin leagues with an automatically computed standings table
  • Group stage plus knockout: a snake-draw group split, automatic per-group standings, and a knockout bracket seeded from the group results so group-mates never meet in the first knockout round wherever that’s mathematically possible
  • Age-class/category labelling, so one cup event with several parallel age groups (e.g. P12, F14, Herr Senior) stays organised – each with its own points system (win/draw/loss values) and tiebreak order (goal difference, head-to-head, goals scored, in whatever order you choose)
  • Field/venue management and automatic scheduling: register your pitches, then auto-assign every match a field and kick-off time (with a configurable break between matches on the same field) in one click
  • Three roles beyond a plain administrator: a Cup Admin (full access without needing full site-admin rights), a Cup Official who can only record results for the field(s)/category they’re assigned to (built for a phone at the pitch-side), and a Team Manager who can register their own team and gets emailed when their matches are scheduled
  • Per-team rosters – add each team’s players (name, shirt number, role) by hand or by CSV import; an optional youth/privacy mode shows only a shirt number or initials on public pages
  • Automatic winner advancement – enter a result, the bracket updates itself
  • Shortcodes and a Gutenberg block to embed any competition’s live bracket/table and standings, its schedule, the full venue list, or a team-registration form anywhere on the site
  • A calendar feed (.ics) for any team – subscribe once in Google/Apple/Outlook and every scheduled or rescheduled match shows up automatically, no app or account needed
  • Official Mode installs as its own app on a phone (Add to Home Screen) – a real icon, full-screen, no browser address bar – for whoever’s reporting a match pitch-side
  • Optional one-click import of teams from the SportsPress plugin, if it’s active – fully optional, this plugin works entirely on its own otherwise
  • No external data source, no license check, no locked or capped features – everything listed above is free and fully functional on its own. A separate PRO add-on adds a deeper, live event-by-event match reporting mode, custom brand colours for public pages, multi-season team history, entry-fee collection via Stripe, SMS match reminders via Twilio, and CSV stats export; this plugin’s own simple result reporting, default styling, single-season stats, free registration, and installable Official Mode app stay free regardless.

Not yet included

Double elimination isn’t built yet – single elimination, round robin, and group-stage-plus-knockout cover the shapes most cups actually use. Beyond that, stated here plainly rather than left for you to discover the hard way: no interactive embedded map for venues (the venue list shows each field’s name and location as text – pair it with any map block/plugin if you want a visual map), no referee fee/expense tracking (you can assign officials to matches, but the plugin doesn’t track what they’re owed), no live auto-refreshing public view (a spectator’s browser needs a manual reload to see a just-entered result), and no WooCommerce/Swish payment integration. Online entry-fee payment (Stripe), a printable match sheet and CSV export are in the separate PRO add-on, not the free plugin.

Source code

The frontend widget (assets/dist/js/*.js, assets/dist/css/*.css) is a compiled/minified Vue 2 application. Its full, human-readable source ships inside this plugin’s own package – assets/src/ (the Vue components and entry point), plus assets/package.json, assets/vue.config.js and assets/babel.config.js (the build configuration). Nothing needed to rebuild it is stripped from the distributed zip; there is no separate download.

To rebuild it yourself: cd assets, then npm install followed by npm run build (Vue CLI / webpack), which regenerates the contents of assets/dist/.

Disclaimer

Your content. You are solely responsible for the participants, results, fixtures, venues and any other content you enter, for their accuracy, and for having a lawful basis to use any names or details you add. This plugin sends transactional emails through your site’s own mail system – schedule-change notifications to Team Managers, and any address you register – and exposes per-team calendar (.ics) feeds; you are responsible for having consent to contact the people whose addresses you enter.

No affiliation. This plugin is an independent work. It is not affiliated with, endorsed by or connected to any sporting body, league or club, and it applies no sport-specific rules or eligibility checks – it simply records the participants and results you give it.

Not legal advice. Nothing in this plugin or its documentation is legal, tax or regulatory advice about organising a competition, collecting registrations, handling personal data or anything else. Seek your own advice where you need it.

No warranty. This plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Screenshots

Blocks

This plugin provides 2 blocks.

  • Cup Bracket Show a tournament bracket or standings table created with Sportstats Cup Generator.
  • Cup Generator Embed a competition's live bracket/table, its schedule, the site venue list, or a team-registration form.

Installation

  1. Upload the plugin files to the /wp-content/plugins/sportstats-cup-generator directory, or install the plugin package directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Go to Competitions in your admin menu, create a competition, add participants, and click “Generate draw”.
  4. Add [sswpfc_cup_v2 id="123"] (using your competition’s ID, shown on its management page) to any page or post to show its live bracket/table and standings, [sswpfc_cup_v2_schedule id="123"] for its fixture schedule, or [sswpfc_cup_v2_venues] for the full list of registered venues – or insert the “Cup Generator” block and pick what to show from its settings panel.

FAQ

Does this work for any sport?

Yes. Five sports are built in with their own scoring and result shapes – football, volleyball, ice hockey, basketball and handball – and there is a no-code Custom Sport Builder for anything else (define its periods, how a result is entered, the scoring and the tiebreak order). At its simplest a competition is still just named participants and win/draw/loss results, so it also works fine for a generic knockout with no sport-specific rules at all.

What happens with an odd number of participants, or a number that isn’t a power of two?

Byes are assigned automatically using standard tournament seeding, so the strongest (or randomly drawn) entrants get first-round byes rather than the bracket breaking or needing manual fixing.

Does a single-elimination match support a draw?

No – someone has to advance. If a match can end level (e.g. after normal time), settle it however your sport/event does (penalties, overtime, a replay) and enter the final outcome as the result. Group-stage matches within a group-plus-knockout tournament DO support a draw, same as a round-robin match would – it’s only the knockout phase where a winner is required.

Can I run several age classes/categories under one event, sharing the same pitches?

Yes – create one tournament per category and give each a category label, then register your fields once (they’re shared across every tournament, not tied to one) and schedule each tournament separately against those same fields.

How does a Cup Official get access to only their own field/category?

An administrator assigns a WordPress user the “Cup Official” role, then sets which field(s) and/or category (or categories) they’re allowed to record results for. An official with nothing assigned yet can’t record anything at all – scope has to be explicitly granted, it’s never on by default.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Sportstats Cup Generator” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.11.10

  • Same review follow-up, one more spot: Advanced (live, event-by-event) match reporting’s 5 write actions (start/finish a match, record/delete an event, set the lineup) are no longer exposed by this free plugin’s REST API at all – they had the same “works over the API regardless of the PRO toggle” shape as the previous fix, just not yet flagged. Reads (event feed, live score, lineup) are unaffected. No change for sites not running the PRO add-on; a PRO site keeps full Advanced reporting exactly as before.

0.11.9

  • wordpress.org review follow-up: removed the custom brand-colour settings page and the multi-season team history tab from this free plugin (both now live only in the separate PRO add-on) – neither was fully unlocked without a licence, which isn’t allowed for code hosted here. No change for sites not running the PRO add-on.
  • No longer bundles a translation file or calls load_plugin_textdomain() – not needed, translations are served automatically via translate.wordpress.org once a plugin is hosted there.

0.11.8

  • Match protocol: events are now sorted by the sport’s actual period order and match minute, not by the order they were logged in. A correction or a retroactively-added event (e.g. a card added after the match) used to sort to the end of the list regardless of when in the match it happened.
  • Match protocol and live match entry: event type labels (Goal, Yellow Card, Substitution, etc.) are now fully translated, matching the site’s language everywhere instead of only in some places.

0.11.7

  • Security / privacy hardening (release-audit follow-up):
    • The retired v1 tournament REST routes (/wp-json/sswpfc-cup/v1/tournaments/...) are no longer public. They returned raw database rows without the field allowlist the current view uses, which could expose a tournament’s creator and a participant’s assigned user id to an anonymous request. They now require administrator access; the supported public surface is the v2 competition routes, which are already allowlisted.
    • The public “team matches” endpoint now runs every match row through the same field allowlist as the bracket, so an organiser’s private per-match notes and reminder timestamps are never returned.
    • Match events no longer accept or return a free-form metadata blob. The client can only send the specific, validated fields (substitute-in player, assist players, disciplinary reason); anything else is ignored on save and stripped on read.
  • Data-integrity hardening:
    • Regenerating a draw or a playoff bracket is refused once any result has been recorded (delete the competition and start over if the draw is wrong), and it now goes through the same atomic cleanup as deleting a competition — no more orphaned events, line-ups, results or official assignments from a playoff re-generation. Every step of that cleanup checks its own database result and rolls the whole operation back on failure instead of committing a half-done state.
    • A team’s owner can only be reassigned by a competition administrator, not by the team’s own manager, and a team can only be renamed after the draw by an administrator.
  • Documentation: the “Not yet included” section and the “any sport?” FAQ corrected to match what the plugin actually does now (rosters, the five built-in sports and the Custom Sport Builder). Internal design documents are no longer shipped in the plugin package.

0.11.6

  • The public competition view ([sswpfc_cup_v2] / the block) now server-renders a league’s standings table into the page HTML, so search engines and visitors with JavaScript disabled see the table instead of an empty box – important for a page people search for by name (” table”). The interactive view still loads on top for everyone else. Only round-robin leagues are pre-rendered; a knockout cup’s bracket is unchanged. The pre-rendered table also carries proper table semantics (caption, row/column headers, expanded abbreviations) for screen-reader users.

0.11.5

  • Accessibility: the public competition view now announces its loading and error states to screen readers (role=”status” / role=”alert”) rather than changing silently. No visible change.

0.11.4

  • New: youth / privacy mode, set per competition on the Teams tab. When on, public roster lists and top-scorer tables show a player’s shirt number (or their initials, if they have no number) instead of their full name, and the free-form player metadata field is no longer exposed in the public API. Organisers and each team’s own manager still see full names everywhere. Intended for competitions with under-age players.

0.11.3

  • The public REST view of a competition no longer returns internal fields. Before, GET /competitions/{id} handed back the raw database rows, which meant a logged-out visitor could read a competitor’s assigned manager, their entry-fee payment status and Stripe session id, plus an organiser’s private per-match notes. The public response now carries an explicit allowlist of fields; a user who can manage the competition still gets the fuller set (manager, payment status, notes) but the Stripe session id is never exposed anywhere.
  • Deleting a competition, resetting a draw, or removing a competitor now runs as one atomic operation and cleans up every dependent row. Previously, deleting a competition left its match events, line-ups, official assignments, groups, class assignments, team members and result subscribers orphaned in the database forever, and regenerating a draw left the old matches’ events and results behind; a failure part way through could leave the data half-removed. Removing a competitor that is already in the generated draw is now refused with a clear message (reset the draw first) rather than silently breaking the bracket.
  • Fixed the round-robin / league scheduler giving one team almost all of its matches at home. The schedule is now built as a proper Berger table: every pair still meets exactly once (or twice, once at each venue, in a double round-robin), but each team’s home/away split is balanced to within one game and no team gets a home or away run longer than two.

0.11.2

  • Added a Disclaimer section to this readme: the site owner is responsible for the participants, results and schedules they enter and for consent to send the transactional emails and calendar (.ics) feeds the plugin generates; the plugin is an independent work with no affiliation to any sporting body and applies no sport-specific rules; nothing here is legal advice; plus the standard GPL “no warranty”. No code or feature change.

0.11.1

  • The multi-sport “Competitions” screen is now the single admin home for building a competition. The older tournament screen and its “Cup Bracket” block are retired; existing [sswpfc_cup ...] shortcodes still work unchanged, and no data is touched or migrated.
  • New “Cup Generator” block for the multi-sport system: pick a competition and choose what to embed (bracket/table + standings, schedule, venue list, or a team-registration form). Same options as the [sswpfc_cup_v2 ...] shortcodes.
  • Installation instructions corrected to the current shortcodes ([sswpfc_cup_v2 ...]).
  • The distributed zip now also carries assets/package.json and the Vue/Babel build config alongside assets/src/, so the compiled bundle can be rebuilt straight from the plugin package with no separate download.

0.11.0

  • New PRO extension point: a printable match sheet – a clean, paper-formatted page (standings + full fixture list) you print or “Save as PDF” from your browser. Link on the Results & statistics step; nothing shown without the PRO add-on active.

0.10.0

  • New PRO extension point: stats export (CSV) – a “Download standings/matches (CSV)” link on the Results & statistics step. Plain CSV, opens directly in Excel/Sheets. No link shown at all without the PRO add-on active.

0.9.0

  • New: Official Mode is now installable as its own app (Add to Home Screen / Install app) on any phone – a proper icon, opens full-screen with no browser chrome, still exactly the same free Simple match reporting underneath.

0.8.0

  • New: a “register a team” widget ([sswpfc_cup_v2_register]) – a logged-in team manager can now actually register a new team for an open competition. Self-registration existed as a REST endpoint before this but had no page anywhere to use it from.
  • New PRO extension points: entry-fee collection (Stripe) on self-registration, and SMS match reminders (Twilio) to assigned officials. This plugin has no notion of payment/SMS itself, same stance as every other PRO feature – registration always succeeds regardless of whether a fee is configured.

0.7.0

  • New: a calendar feed link (“Add to calendar”) on any team’s own page – subscribe once in Google/Apple/Outlook and every scheduled/rescheduled match just shows up automatically. Free, no account needed on either side.

0.6.0

  • Fixed: automatic scheduling now avoids double-booking a venue shared between two DIFFERENT competitions (it already avoided this within one competition) – a real fix, free for everyone, not a PRO feature.
  • New (PRO): a Team History tab on any team’s own page, showing its record in every OTHER competition/season it has appeared in (matched by team name), plus a combined all-time total. Not shown at all without the PRO add-on active.

0.5.0

  • New: a Branding admin page (Competitions Branding) for setting two custom brand colours used across every public competition page. This plugin has no notion of licensing itself – the colour picker is always visible so you can see what’s available, but only takes effect with a separate PRO add-on active; without it, every public page keeps this plugin’s own built-in colours.

0.4.0

  • Renamed to Sportstats Cup Generator (was SportstatsWP Cup Generator) – no functional change, just the display name and the plugin’s own slug/text domain (sportstats-cup-generator, was sswpfc-cup-generator), so a WordPress.org listing doesn’t fall foul of the “no restricted term in the slug” rule.
  • Match reporting’s live, event-by-event “Advanced” mode is now a PRO extension point (sswpfc_cup_pro_advanced_reporting) – a no-op unless a separate PRO plugin is installed and hooks it. Simple result reporting is unaffected and stays free.

0.3.1

  • The “New competition” wizard’s Teams step now has the same CSV bulk-import as the full Teams & players tab, so setting up a new competition’s teams no longer means leaving it and coming back in just to bulk-upload them.
  • “Draw” moved after “Venues & schedule” in the competition’s step list – after scheduling, the fixture list/individual match times are now the next step forward instead of a step back up the list.

0.3.0

  • A bulk-imported (or manually added) team can now be renamed or removed while the competition is still in draft (before the draw is generated) – fixing a CSV typo no longer means starting the whole competition over.
  • The Schedule step’s venue picker now defaults to just the venues this competition’s own teams actually call home, instead of every venue ever created on the site – with a “show all venues” link when you need a fallback/borrowed one.
  • Added “Clear schedule & start over” (wipes every match’s time/venue so the planner can be re-run with different rules, e.g. 2 matches/week instead of 1) and “Confirm schedule” (locks bulk re-scheduling once you’re happy; individual match times/venues can still always be adjusted from Draw & fixtures, confirmed or not – “Reopen for changes” undoes the lock).
  • Official Mode’s match reporting view is no longer capped to a fixed narrow column on desktop – it now uses the available width, staying just as compact as before on a phone.
  • Group stage plus knockout format, with automatic snake-draw group assignment and cross-seeded knockout qualification.
  • Age-class/category labelling with per-tournament configurable points (win/draw/loss) and tiebreak order (including head-to-head).
  • Field/venue management and one-click automatic match scheduling across multiple pitches.
  • Cup Admin, Cup Official (scoped to specific fields/categories), and Team Manager roles, including team self-registration and schedule-change email notifications.
  • New [sswpfc_cup_schedule] and [sswpfc_cup_venues] shortcodes, and a “What to show” option added to the Gutenberg block.

0.1.0

  • Initial build: single elimination and round-robin tournaments, seeding and automatic byes, automatic winner advancement, shortcode and Gutenberg block, optional SportsPress team import.