🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Compte Get it free
Random File icon
Ralentir Testé jusqu'à 6.8.13 #11 in coffee2code

Random File

This plugin provides template tags that allow you to retrieve the name, path (relative or absolute), url, or fully marked-up link to a randomly chosen file or files in a specified directory.

Installations actives70+10+ niveaux
Téléchargements · 30D183▲ +61.9% vs prev. 30d
Évaluation5/51 avis
Score de santé41/100En danger
Téléchargements de tous les temps30.1KSince Dec 2004
Support résolu—Aucun fil de discussion récent
A besoin deWP 2.8Php tout
Téléchargements · 7j53▲ +6% week over week
Notre verdict

Envisager une alternative

Random File shows warning signs in 2026 — compare the alternatives below before installing. It runs on 70+ sites, is rated 5/5 and was last updated 2 years ago, and scores 41/100 on our health check.

  • Petite base d'utilisateurs (plus de 70 installations actives)
  • Très peu de critiques jusqu'à présent
  • Pas de mise à jour depuis plus d'un an
  • Uniquement testé jusqu'à WordPress 6,8 (le dernier est de 7,1)

Comment s'accumule-t-il ?

Côte à côte sur les installations, les mises à jour, les évaluations et le support

Téléchargements quotidiens

369Aug 31Oct 14Nov 28
Hier6
Moyenne quotidienne (1 ans)3
Jour de pointe208 mai 2026
12 Derniers mois1.1K

Les pics de téléchargement suivent généralement une nouvelle version - chaque site qui met à jour automatiquement compte comme un téléchargement.

Classements

Where Random File stands today

WordPress.org Classements de recherche

Position en direct dans la recherche de plugins, Top 100
Mot-cléPositionPlugins concurrentsCatégorie
coffee2code #9 65 Best coffee2code plugins →
file >100 10,000 Best file plugins →
fichiers >100 10,000 Meilleurs plugins de fichiers →
fait au hasard #48 3,938 Meilleurs plugins aléatoires →
randomize #32 138 Best randomize plugins →

Adoption de version

Part de sites actifs par version.

  • 2.0100.0%

Répartition des notes

★★★★★ ★★★★★ 5 sur 1 avis

  • 5★100.0%
  • 4★0.00%
  • 3★0.00%
  • 2★0.00%
  • 1★0.00%

About Random File

À partir du Lisez-moi officiel · v2.0.1

Description

This plugin provides template tags that allow you to retrieve the name, path (relative or absolute), url, or fully marked-up link to a randomly chosen file or files in a specified directory.

Arguments to the functions permit you to limit what file(s) can be randomly selected based on a given set of file extensions. You can also explicitly specify files that should not be randomly selected.

This functionality can be useful for displaying random images/logos or including text from random files onto your site (writing excerpts, multi-line quotes, etc). Other ideas: random ads, random CSS files, random theme template selection.

Notes:

  • If you want to actually display the name of the random file, be sure to ‘echo’ the results:

  • Unless you limit the file search to only include a particular extension (via $extensions argument), all files in the specified $dir will be under consideration for random selection

  • Can be run inside or outside of “the loop”

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

Developer Documentation

Developer documentation can be found in DEVELOPER-DOCS.md. That documentation covers the template tags and hooks provided by the plugin.

As an overview, these are the template tags provided by the plugin:

  • c2c_random_file() : Retrieves the name of a random file from a specified directory and returns information based on the file.
  • c2c_random_files() : Retrieves the name, path, or link to a specified number of randomly chosen files in a specified directory.

These are the hooks provided by the plugin:

  • c2c_random_file : Filter to safely invoke c2c_random_file() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.
  • c2c_random_files : Filter to safely invoke c2c_random_files() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.

Installation

  1. Install via the built-in WordPress plugin installer. Or download and unzip random-file.zip inside the plugins directory for your site (typically wp-content/plugins/)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. Make use of the c2c_random_file() or c2c_random_files() template function in your code or template (see examples below).

Journal de modifications

Trivial update: fixed some typos in documentation, noted compatibility through WP 6.8+, and updated copyright date (2025).

2.0.1 (2025-04-08)

  • Fix: Fix typos in documentation
  • Change: Note compatibility through WP 6.8+
  • Change: Update copyright date (2025)
  • Unit tests:
    • Change: Switch uses of assertRegExp() to assertMatchesRegularExpression() for future PHPUnit 10 compatibility
    • Change: Explicitly define return type for overridden method

2.0 (2024-08-13)

Highlights:

This minor update features improved randomization of file selection, adds support for the extensions argument to be an array, notes compatibility through WP 6.6+, removes unit tests from release packaging, updates copyright date (2024), and other code improvements and minor changes.

Details:

  • Change: Switch to using wp_rand() for more reliable randomization
  • Change: Allow $extensions argument to also accept an array of extensions
  • Change: Strip surrounding whitespace and leading periods from provided extensions
  • Change: Explicitly return false if no file could be found
  • Change: Switch to use a switch statement, which is more concise
  • Change: Use cleaner sprintf() approach to outputting markup
  • Hardening: Escape text shown via ‘hyperlink’ output (though it’s never anything other than plaintext)
  • Change: Note compatibility through WP 6.6+
  • Change: Update copyright date (2024)
  • Change: Tweak filter descriptions in readme.txt
  • New: Add .gitignore file
  • Change: Remove development and testing-related files from release packaging
  • Unit tests:
    • Hardening: Prevent direct web access to bootstrap.php
    • Allow tests to run against current versions of WordPress
    • New: Add more unit tests
    • New: Add composer.json for PHPUnit Polyfill dependency
    • Change: In bootstrap, store path to plugin directory in a constant
    • Change: Rename a test

1.8.12 (2023-05-21)

  • New: Add DEVELOPER-DOCS.md and move hooks documentation into it
  • Change: Note compatibility through WP 6.3+
  • Change: Update copyright date (2023)

Full changelog is available in CHANGELOG.md.

Journal des modifications complet sur WordPress.org →

Pour les développeurs

Est-ce votre plugin ? Montrez les chiffres.

Ajoutez un badge en direct à votre site, docs ou github readme. Il se met à jour par lui-même - aucun compte n'est nécessaire.

Badge d'installations actives Badge Badge de score de santé

Best Random File alternatives

All coffee2code plugins →
Alternatives
Rang Plugin Installations actives Évaluation Mise à jour Santé
1 Disable Search Disable Search Disable the built-in front-end search capabilities of WordPress. de Scott Reilly 30K+ ★★★★★★★★★★ 4.7 (16) Il y a 2 ans 51
2 Configure SMTP Configure SMTP Configure SMTP mailing in WordPress, including support for sending email via SSL/TLS (such… de Scott Reilly 5K+ ★★★★★★★★★★ 4.9 (45) Il y a 2 ans 46
3 Fermer les commentaires en un clic Fermer les commentaires en un clic Fermez ou ouvrez facilement les commentaires pour un message ou une page en un clic de l'administrateur… de Scott Reilly 5K+ ★★★★★★★★★★ 4.9 (10) Il y a 2 ans 50
4 Text Replace Text Replace Replace text with other text. Handy for creating shortcuts to common, lengthy, or… de Scott Reilly 3K+ ★★★★★★★★★★ 4.4 (18) Il y a 5 ans 38
5 Duplicate Widget Duplicate Widget A widget that can act as a duplicate of another widget (for synchronized use in another… de Scott Reilly 1K+ ★★★★★★★★★★ 4.3 (12) il y a 9 ans 36
6 Force Admin Color Scheme Force Admin Color Scheme Force a single admin color scheme for all users of the site. de Scott Reilly 500+ ★★★★★★★★★★ 5 (2) Il y a 2 ans 43
7 Single Category Permalink Single Category Permalink Reduce permalinks (category or post) that include entire hierarchy of categories to just… de Scott Reilly 400+ ★★★★★★★★★★ 5 (5) Il y a 5 ans 39
8 Hide Broken Shortcodes Hide Broken Shortcodes Prevent broken shortcodes from appearing in posts and pages. de Scott Reilly 400+ ★★★★★★★★★★ 4.5 (10) il y a 7 mois 52
9 Years Ago Today Years Ago Today Lists posts published to your site on this day in previous years via admin dashboard… de Scott Reilly 100+ ★★★★★★★★★★ 5 (6) Il y a 6 mois 65
10 Disable Directory Listings Disable Directory Listings Prevent virtual directory listing services from listing the contents of directories, and/or… de Scott Reilly 90+ ★★★★★★★★★★ 5 (1) Il y a 15 ans 32

FAQ

Random File: quick answers

Réponses directes, extraites des données en direct WordPress.org.

Source : WordPress.org

Is Random File free?

Yes. Random File is free to download and use from the official WordPress.org plugin directory.

Is Random File safe to use in 2026?

Random File shows warning signs in 2026 — compare the alternatives below before installing. It runs on 70+ sites, is rated 5/5 and was last updated 2 years ago, and scores 41/100 on our health check.

How many websites use Random File?

Random File is active on 70+ WordPress websites and has been downloaded 30,092 times since it launched in December 2004. It was downloaded 183 times in the last 30 days.

Does Random File work with WordPress 7.1?

Random File is officially tested up to WordPress 6.8.13, while the latest release is 7.1.5. It may still work, but try it on a staging site first.

When was Random File last updated?

The latest version, 2.0.1, was released on April 8, 2025 (2 years ago).

Who makes Random File?

Random File is developed and maintained by Scott Reilly.

What are the best alternatives to Random File?

The most popular alternatives to Random File are Disable Search (30K+ installs), Configure SMTP (5K+ installs) and One Click Close Comments (5K+ installs).

Propulsé par PageForge

Un modèle et une feuille de calcul. Une vraie page pour chaque recherche.

PageForge transforme chaque ligne d'un CSV en une page WordPress avec son propre titre, URL, SEO et schéma, construit sur la mise en page que vous Déjà conçu. Gratuit sur WordPress.org.

  • CSV et XLSX, plus Google Sheets sur les professionnels et les entreprises
  • Son propre titre, URL, SEO champs et schéma pour chaque page
  • Fonctionne avec l'éditeur de blocs, Elementor, Divi et Avada
  • Gratuit sur WordPress.org, pas de carte de crédit

↑↓ bouger↵ ouvrir