Random.org vs Built-in Random: Which Raffle Draw Method Is Actually Fair?

I tested three random number methods used in WooCommerce raffle plugins. What wp_rand() really uses, what Random.org adds, and which one to pick.

This week I checked this post line by line against the Raffle for WooCommerce code. Two of its biggest claims didn’t hold up.

The first said our Standard Random option runs on Mersenne Twister, the old PHP generator whose seed can be cracked in under a minute. It doesn’t. Standard Random calls WordPress’s wp_rand(), and since WordPress 4.4, wp_rand() gets its number from PHP’s secure random_int() first.

The second said every Random.org draw comes with a signed receipt anyone can verify. Our plugin calls Random.org’s Basic API, which sends back the numbers without a signature.

I’d rather fix that in public than leave a post that promises more than the plugin does. So this is the corrected version: what each draw method actually does, where its randomness comes from, and which one I’d pick for your raffle.

TLDR

In Raffle for WooCommerce, Standard Random and Cryptographically Secure both draw from PHP’s random_int() on any server that meets our PHP 7.4 requirement, so neither can be predicted from earlier draws. Random.org adds numbers made from atmospheric noise, off your server, by a service certified by Gaming Labs International. Our plugin doesn’t fetch Random.org’s signed results yet, so it can’t hand you a third-party receipt. For most raffles, I’d use the default, Cryptographically Secure.

“Was the draw fair?”#

That question comes up after every raffle. Sometimes from a disappointed participant. Sometimes from a charity board reviewing compliance. Sometimes from a regulator in Ontario who needs to see documentation.

The answer depends on how the winning ticket was picked. Not on whether the plugin says “random” in its settings, and not on whether the draw looked random. It depends on where the number came from and whether anyone could have known it in advance.

What “random” means#

True randomness means nobody can predict the next number. No pattern, and no starting value that would reproduce the same sequence if you knew it.

Most software doesn’t make true random numbers. It makes pseudorandom ones: sequences that look random but come from a fixed formula. Feed the formula the same starting value, called a seed, and you get the same sequence every time. That’s how pseudorandom number generators (PRNGs) work by design.

For most jobs, that’s fine. Shuffling a playlist, ordering products on a page, making test data. Nobody cares whether the shuffle was “truly” random.

Raffles are different. When money and real prizes are involved, “looks random” isn’t enough. You need either a generator built so its output can’t be predicted, called a cryptographically secure generator, or physical randomness that no formula produced at all.

The three methods in Raffle for WooCommerce#

The plugin offers all three in the Selection Method dropdown when you draw winners: Standard Random, Cryptographically Secure, and Random.org (True Random). You’ll find the code in includes/class-rfwc-winner-selector.php.

1. Standard Random (wp_rand())#

This option calls WordPress’s wp_rand(). The old version of this post said wp_rand() wraps mt_rand(). It doesn’t. Since WordPress 4.4, wp_rand() asks PHP’s random_int() for the number first. It only falls back to WordPress’s own hash-based generator if random_int() fails, which doesn’t happen on a normal server running PHP 7 or later.

So on any site that can run our plugin (PHP 7.4 or newer), Standard Random gets the same quality of randomness as the secure option.

The weak generator from the old post is real. It just isn’t ours. PHP’s mt_rand() and rand() use the Mersenne Twister algorithm from 1997. It’s deterministic, and there are only about 4.3 billion possible seeds.

A tool called php_mt_seed can find the seed from observed outputs, and on a modern quad-core CPU it searches the full 32-bit seed space in under a minute. Security researchers at White Knight Labs showed in 2024 that two known mt_rand() values are enough to rebuild the whole sequence, past and future.

If a raffle plugin calls mt_rand() or rand() directly, that’s the risk you take on. Ask the developer which function their draw uses. It’s a one-line answer.

2. Cryptographically Secure (random_int())#

This option calls PHP’s random_int() directly. It’s a cryptographically secure pseudorandom number generator (CSPRNG). The part that matters: nobody can predict or reverse-engineer its output.

random_int() pulls its randomness from your operating system:

Operating SystemEntropy Source
Linuxgetrandom(2) system call (kernel entropy pool, fed by hardware interrupts, disk timing, network events)
WindowsCNG-API (BCryptGenRandom)
macOS/BSDarc4random_buf()
Fallback/dev/urandom

These sources collect unpredictable physical events from the hardware and mix them together. There’s no 32-bit seed to recover, so there’s nothing for a tool like php_mt_seed to search.

If Standard Random already uses random_int(), why keep both? Cryptographically Secure calls random_int() itself, so it doesn’t depend on wp_rand(). That matters because wp_rand() is a pluggable function: another plugin can replace it with its own version. It’s a small difference, and it’s why Cryptographically Secure is our default.

Speed: random_int() is slower than mt_rand(). Benchmarks on PHP 7.4 show it taking roughly 29 times longer per call (9.2 seconds against 0.32 seconds for 10 million calls). That’s about a microsecond per call. For a draw that picks a few winners, you’ll never notice.

Where it falls short: You can show the code uses random_int(), but you can’t hand someone a certificate for one specific draw. If someone asks you to prove the March 15 draw was fair, you can explain the method and show the draw record. You can’t produce outside proof.

3. Random.org (true random from atmospheric noise)#

Random.org makes random numbers from atmospheric noise: radio noise from natural processes in the atmosphere, including lightning. It has run since 1998 and is operated by Randomness and Integrity Services Ltd., founded by Dr. Mads Haahr at Trinity College Dublin.

Independent certification: Random.org says on its features page that it is independently certified by Gaming Labs International (GLI) on a regular basis. GLI tests randomness for casinos and state lotteries, and its GLI-31 standard covers electronic raffle systems.

The Signed API: Random.org also offers a Signed API. It returns the numbers with a digital signature, a serial number and the time they were made. Anyone can check that signature at random.org/signatures, which proves the numbers came from Random.org and weren’t changed.

What our plugin does with it: Raffle for WooCommerce doesn’t use the Signed API at the moment. It calls the Basic API’s generateIntegers method and asks for one number per winner, picked from your ticket pool without repeats.

You get numbers made off your server, by a certified source, and the winner record notes that the draw used Random.org and when Random.org made the numbers. You don’t get a signature, so there’s no receipt a stranger can check on their own.

Pricing: Check this before your first real draw. Random.org’s pricing page lists a free Developer plan “for software developers building and testing applications”, capped at 1,000 requests a day.

For prize draws, it lists a Flexible Prize Draw plan at $50 a month, plus a fee per request based on the prize value.

The old version of this post called Random.org free for raffle draws. Going by their own pricing page, the free key is meant for testing.

Side-by-side comparison#

In plain words: Standard Random and Cryptographically Secure are dice rolled from electronic noise inside your own server. Random.org is dice rolled from noise in the atmosphere, on someone else’s server, by a company that gets audited.

FeatureStandard Random (wp_rand)Cryptographically Secure (random_int)Random.org (Atmospheric Noise)
Source of randomnessPHP random_int(), through WordPressOS entropy pool (hardware events)Physical atmospheric noise
Predictable from earlier draws?NoNoNo
Seed recovery possible?No (unlike mt_rand())NoN/A (no seed)
Gaming Labs certifiedNoNoYes
Signed proof in our pluginNoNoNo (Basic API)
Requires internetNoNoYes
SpeedAbout a microsecondAbout a microsecondOne web request to Random.org
If it failsFalls back to WordPress’s own generatorFalls back to wp_rand()Falls back to random_int()
CostFreeFreePaid plans for prize draws
Best forAny drawAny draw (our default)Numbers made off your server

Which method should you use?#

The right choice depends on what’s at stake and who you need to satisfy.

Use Cryptographically Secure when#

  • You’re running almost any raffle, from an office draw to a charity prize.
  • You want unpredictable numbers with no setup and no internet dependency.
  • You want the method that doesn’t rely on any other plugin.

Standard Random gives the same result on a normal server. I still pick Cryptographically Secure, because it’s the one I can explain in one sentence.

Use Random.org when#

  • You’ve told participants the numbers will come from an outside source.
  • Your board or organizers don’t want the numbers made on your own server.
  • You’re happy to pay for a Random.org plan that covers prize draws.

When you need a receipt someone else can check#

If a regulator or auditor wants proof they can verify themselves, our plugin can’t give you that today, and I’d rather say so here than at draw time.

Random.org runs its own Third-Party Draw Service, where they hold the draw and keep the public record. If you run under rules like Ontario’s Electronic Raffle Systems Minimum Technical Standards, ask the regulator which random sources they accept before you pick one.

Setting up Random.org in Raffle for WooCommerce#

The setup takes a couple of minutes:

  1. Get an API key at api.random.org, on the plan that fits your draw.
  2. Paste it into the Random.org API Key field in WooCommerce > Settings > Raffle.
  3. When you draw winners, pick Random.org (True Random) in the Selection Method dropdown. For automatic draws, set Default Selection Method to Random.org on the same settings screen.

The request to Random.org contains your API key, the number of winners and the size of your ticket pool. No customer data leaves your site.

Each winner record keeps the draw’s proof data: the method, the pool size, the time of the draw and the time Random.org made the numbers. The raffle’s activity log, shown in the analytics dashboard, records each winner and the method used.

If Random.org can’t be reached, or no API key is saved, the plugin falls back to random_int() so the draw still completes. The proof data marks the fallback and saves the error.

One thing to know: the winners list and the activity log still show Random.org as the method in that case. If a draw ran while Random.org was down, check the proof data for the fallback note.

Building trust beyond the algorithm#

The random method is the foundation, but participants also care about the process around the draw. A few habits make a real difference.

Announce your method before the draw. Say on your raffle page which method you’ll use. “Winners will be picked with Random.org’s certified random numbers” tells people you thought about fairness before anyone asked.

Draw in public. If the raffle is part of a live event, share your screen during the draw. For online-only raffles, record the screen and post the video.

Being open in the moment is worth more than paperwork afterward. If you stream draws often, the winner reveal page in Raffle for WooCommerce Pro is built for it.

It works as an overlay on YouTube, Facebook or Instagram, and it loads winner data only when the reveal plays, so nobody can spot the result early in the page source.

Keep the draw record easy to find. In Raffle for WooCommerce, the method, time, pool size and selected tickets for every draw are saved with the winners, and the activity log sits in the analytics dashboard. If a board member asks for documentation six months later, it’s there.

What about other raffle plugins?#

I tested six WooCommerce raffle plugins for my comparison article. This is what each one uses for winner selection:

PluginSelection MethodRandom.org optionAudit Trail?
Raffle for WooCommerce (ours)Standard Random, Cryptographically Secure, Random.orgYesYes
Giveaway by FlintopBuilt-in randomNoNo
Ultimate RaffleBuilt-in randomNoNo
Raffle Play WooBuilt-in randomNoNo
Giveaway Lottery (WebCartisan)Built-in randomNoNo
Raffle Ticket GeneratorBuilt-in randomNoNo

None of the other plugins I tested offer Random.org integration or a draw audit trail. “Built-in random” can mean a secure function or a weak one, so ask the developer which.

What the method changes, and what it doesn’t#

Does the method change who wins? Not in any way you’d see. A secure generator and Random.org both spread wins evenly. Run either a million times and the frequency chart looks flat. Even mt_rand() looks flat.

The difference is in three other places.

Predictability: With mt_rand(), someone who sees enough outputs can predict the next ones. With random_int() or Random.org, they can’t.

Where the number comes from: With random_int(), the number is made on your own server, and you’re asking people to trust your setup. With Random.org, it’s made by an outside company that gets audited.

What you can prove: With either method in our plugin, you can show the method and the draw record. Proof that a stranger can check without trusting you needs a signed result or a third-party draw service.

Ontario’s Electronic Raffle Systems Minimum Technical Standards (AGCO, effective January 2025) require raffle systems to keep “technical integrity, security, and accounting capability” and to block unauthorized changes to game data. Whether a setup meets that is the regulator’s call. Ask before the draw, not after.

Frequently asked questions#

Is mt_rand() truly broken for raffles?#

Not broken in the sense of biased numbers. The spread is fine. It’s broken in the sense that the output can be predicted once someone has seen enough of it. For a casual giveaway, that doesn’t matter. For a charity raffle with a $10,000 prize, it’s a real concern. Raffle for WooCommerce doesn’t use mt_rand() for draws.

Does Random.org slow down the draw?#

It adds one web request to Random.org. The plugin waits up to 30 seconds for the answer before it gives up and falls back to random_int(). For a draw that happens once per raffle, that’s fine.

What happens if Random.org is down during my draw?#

Raffle for WooCommerce falls back to random_int() and finishes the draw. The winner’s proof data marks the fallback and saves the reason. The winners list still shows Random.org as the method, so check the proof data if you need to know which one ran.

Is Random.org free for raffle draws?#

Not for real prize draws, going by Random.org’s pricing page. The free Developer plan is “for software developers building and testing applications”. The plan for prize draws, Flexible Prize Draw, is $50 a month plus a fee per request based on the prize value. Read their plans before you rely on a free key.

Can I switch methods between raffles?#

Yes. For a manual draw, you pick the method at draw time, not when you create the raffle. Automatic draws use the Default Selection Method in WooCommerce > Settings > Raffle. You can use Standard Random for an office pool and Random.org for a charity draw.

Do I need Random.org for every raffle?#

No. For informal giveaways, store promotions and most charity draws, random_int() is more than enough. Random.org adds value when you want the numbers made outside your own server.

What does Gaming Labs International certification mean?#

Gaming Labs International (GLI) is an independent testing and certification company for the gaming industry. They test everything from casino slot machines to state lottery systems. Their certification of Random.org means its number generation has been checked by an outside lab against gambling-industry standards.

Is random_int() considered “true random”?#

Technically, no. It’s a CSPRNG that uses physical events as its seed. The distinction is academic for most uses. What matters is that the output can’t be predicted, even by someone with full access to the server. For almost every WooCommerce raffle, random_int() is all the security you need.

Which WooCommerce raffle plugins support Random.org?#

As of October 2026, Raffle for WooCommerce is the only WooCommerce raffle plugin I’ve found that can pull draw numbers from Random.org’s API. Other plugins use built-in PHP random functions. If you know of another plugin that supports Random.org, let us know.

What I’d do#

For most WooCommerce raffles, I’d leave the method on Cryptographically Secure. It’s unpredictable, needs no setup, works offline and costs nothing. If someone asks whether the draw was fair, you can say the number came from the operating system’s entropy and nobody could have known it in advance.

If you want the numbers made outside your own server, Random.org is worth the few minutes of setup and the plan that covers prize draws. If you need proof a stranger can check without trusting you, today that means Random.org’s Third-Party Draw Service, not our plugin.

Raffle for WooCommerce is free on WordPress.org and includes all three methods. The winner selection documentation covers the setup. For the legal side of a charity raffle, the charity raffle guide covers the requirements in the US, UK and Canada. And if you’re still choosing a plugin, start with my hands-on comparison of every WooCommerce option.

Before your next draw, open the Selection Method dropdown and check which method is picked. It takes ten seconds, and it’s the answer you’ll give when someone asks.