WordPress.WP.AlternativeFunctions.file_system_operations_fputs
file system operations fputs
The plugin performs filesystem work with raw PHP functions where WordPress expects safer filesystem handling.
Why It Shows Up
Plugin Check found functions such as `fopen`, `fwrite`, `chmod`, `mkdir`, `readfile`, or related operations.
Why It Matters
WordPress sites can use different filesystem permissions and transports. Raw filesystem calls can fail on common hosts or write to unsafe locations.
How to Fix
- Use WordPress filesystem helpers when writing, reading, or changing files in plugin-managed paths.
- Validate paths and keep writes inside directories owned by the plugin or WordPress uploads.
- Never write PHP code from user input or remote responses.
References
Affected Plugins
| Rank | Plugin | Score | Errors | Warnings | Installs | Added | Updated | Top Issue |
|---|---|---|---|---|---|---|---|---|
| #101 | When Last Login – Export User Records | 61 | 18 | 13 | 500 | Output is not escaped | ||
| #102 | Faire for WooCommerce | 68 | 4 | 86 | 800 | Direct Query | ||
| #103 | Emergency password reset | 73 | 56 | 14 | 800 | wp function not compatible with requires wp | ||
| #104 | Salt Shaker | 85 | 15 | 13 | 6k+ | Interpolated SQL is not prepared |