WordPress plugin intelligence profile

Random File

Retrieve the name, path, or link to a randomly chosen file or files in a specified directory.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 6.8
Current version2.0.1
WordPress coverageTested up to WordPress 6.8
Minimum stackWP 2.8 · PHP —
Directory statusactive
Last directory update8 Apr 20251y ago
Active installations70Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 1 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Random File version 2.0.1 as active, updated 1y ago and tested up to WordPress 6.8.

Overview

About this plugin

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

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.
WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • coffee2code
  • file
  • files
  • random
  • randomize
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 6.8

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 6.8.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to6.8
Minimum requirementsWordPress 2.8 · PHP not listed
Update activity8 Apr 20251y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.