WordPress.WP.AlternativeFunctions.rand_mt_rand

rand mt rand

The plugin uses a random function that may not be appropriate for the task.

medium weight

Why It Shows Up

The scan found functions such as `rand()`, `mt_rand()`, `srand()`, or `mt_srand()`.

Why It Matters

General random functions are not suitable for security-sensitive tokens and manual seeding can reduce randomness.

How to Fix

  • Use `wp_rand()` for ordinary WordPress randomness.
  • Use PHP cryptographic randomness for security-sensitive tokens.
  • Avoid manual random seeding unless there is a narrow, documented reason.

Affected Plugins

RankPluginScoreErrorsWarningsInstallsAddedUpdatedTop Issue
#251Beaver Builder Page Builder – Drag and Drop Website Builder254,4631,819100k+Text Domain Mismatch
#252BlockSpare – Gutenberg Post Grid Blocks for News, Magazine & Blog Websites251,3271,71410k+Non-prefixed global variable
#253Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid2524385450k+Non-prefixed global variable
#254Booking Calendar Contact Form25371884500Input is not validated
#255Online Scheduling and Appointment Booking System – Bookly253,52887060k+Text Domain Mismatch
#256SilentShield – Captcha & Anti-Spam for WordPress (CF7, WPForms, Elementor, WooCommerce)2523521410k+Database parameter is not escaped
#257GSheetConnector for CF7 – Connect Contact Form 7 to Google Sheets and Send Form Submissions in Real Time256141,43140k+Non-prefixed global variable
#258Contact Form Email254098989k+Non-prefixed global variable
#259Coupon Creator256984121k+Output is not escaped
#260CP Contact Form with PayPal25466936800Unsafe printing function
#261DecaLog259432361k+Exception output is not escaped
#262Events Made Easy255066,3171k+Non-prefixed function
#263Photo Gallery by FooGallery : Responsive Image Gallery, Masonry Gallery & Carousel258761,798100k+Non-prefixed global variable
#264Gallery Images Ape255883411k+Output is not escaped
#265WPBruiser {no- Captcha anti-Spam}2564625910k+Non Singular String Literal Domain
#266Site Kit by Google – Analytics, Search Console, AdSense, Speed251,3042425m+Missing direct file access protection
#267Sitemap by BestWebSoft – WordPress XML Site Map Page Generator Plugin2560820720k+Text Domain Mismatch
#268HashBar – Announcement, Notification Bar & Popup Campaign252,7186108k+Text Domain Mismatch
#269Hydra Booking — Appointment Scheduling & Booking Calendar252387072k+Non-prefixed global variable
#270Index WP MySQL For Speed2525025550k+Output is not escaped
#271IP Location Block2552162410k+Output is not escaped
#272Loginizer258145041m+Output is not escaped
#273LWS Optimize – All-in-One Speed Booster & Cache Tools2543076420k+Non-prefixed global variable
#274MaxButtons – Create buttons2562640470k+Output is not escaped
#275Media Cleaner: Clean your WordPress!2515139190k+Direct Query
#276Media Cloud Sync251,0952741k+Exception output is not escaped
#277PDF Importer for WPForms25332329400Non-prefixed global variable
#278PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin251,0841,2969k+Non-prefixed global variable
#279BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript251985014k+Non-prefixed global variable
#280Social Media Share Buttons & Social Sharing Icons252,4331,383100k+Unsafe printing function
#281Social Share Icons & Social Share Buttons252,3651,35710k+Output is not escaped
#282VikAppointments Services Booking Calendar259,7535,207500Output is not escaped
#283VikBooking Hotel Booking Engine & PMS2513,2448,3148k+Output is not escaped
#284VikRentCar Car Rental Management System255,5375,0484k+Non-prefixed global variable
#285VikRestaurants Table Reservations and Take-Away2511,6444,932600Output is not escaped
#286Pay with Vipps and MobilePay for WooCommerce258465145k+Output is not escaped
#287Wordfence Login Security2524841870k+Output is not escaped
#288Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals2513735360k+Input is not sanitized
#289WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards251,4311,27010k+Output is not escaped
#290WP Review Slider251,1862,2796k+Non-prefixed global variable
#291WP Go Maps – Google Map, OpenStreetMap, Leaflet Map254,9961,008300k+Unsafe printing function
#292Perfect Images: Regenerate Thumbnails, Image Sizes, WebP & AVIF2515811860k+Non-prefixed global variable
#293SlimStat Analytics251,17787070k+Exception output is not escaped
#294Smush – Image Optimization, Compression, Lazy Load, WebP & CDN252445681m+Non-prefixed hook name
#295WP Time Slots Booking Form254391,1371k+Non-prefixed global variable
#296WPvivid — Backup, Migration & Staging258991,461900k+Non-prefixed namespace
#297AfterShip Tracking – All-In-One WooCommerce Order Tracking (Free plan available)262862918k+Text Domain Mismatch
#298Blog Floating Button267052409k+Output is not escaped
#299Translate WordPress with ConveyThis – AI Multilingual Plugin261592971k+Non-prefixed global variable
#300CP Multi View Events Calendar26864391k+Non-prefixed global variable