
Preserve Code Formatting Security & Risk Analysis
wordpress.org/plugins/preserve-code-formattingPreserve formatting of code for display by preventing its modification by WordPress and other plugins while also retaining whitespace.
Is Preserve Code Formatting Safe to Use in 2026?
Generally Safe
Score 98/100Preserve Code Formatting has a strong security track record. Known vulnerabilities have been patched promptly. It's a solid choice for most WordPress installations.
The "preserve-code-formatting" plugin v5.0 exhibits a generally good security posture with no identified attack surface points and a high percentage of properly escaped output. The absence of critical or high severity taint flows and the exclusive use of prepared statements for SQL queries are positive indicators. However, the presence of the `unserialize` function, even without immediate observable taint flows, introduces a potential risk. This function can be dangerous if used with untrusted data, leading to object injection vulnerabilities. The plugin's vulnerability history includes one high-severity CVE related to "Deserialization of Untrusted Data," which strongly aligns with the risk posed by `unserialize`. While this specific vulnerability is marked as patched, the past occurrence highlights a recurring area of concern and suggests that developers should be particularly vigilant about how serialized data is handled in future versions. The plugin's strengths lie in its limited attack surface and good output escaping practices, but the `unserialize` function and its historical vulnerability pattern warrant ongoing attention.
Key Concerns
- Dangerous function detected (unserialize)
- Past high severity CVE for deserialization
Preserve Code Formatting Security Vulnerabilities
CVEs by Year
Severity Breakdown
1 total CVE
Preserve Code Formatting <= 4.0.1 - Authenticated (Contributor+) PHP Object Injection
Preserve Code Formatting Release Timeline
Preserve Code Formatting Code Analysis
Dangerous Functions Found
Output Escaping
Preserve Code Formatting Attack Surface
WordPress Hooks 21
Maintenance & Trust
Preserve Code Formatting Maintenance & Trust
Maintenance Signals
Community Trust
Preserve Code Formatting Alternatives
Extra Sentence Space
extra-sentence-space
Force browsers to display two spaces (when present) between sentences.
KG Inline Code
kg-inline-code
Replaces any word or sentence between backquotes (`) by a <code> block in a StackOverflow / Markdown way.
Wpautop Mask
wpautop-mask
Toggle wpautop with shortcodes.
Advanced Excerpt
advanced-excerpt
Control the appearance of WordPress post excerpts
Content Blocks (Custom Post Widget)
custom-post-widget
This plugin enables you to edit and display Content Blocks in a sidebar widget or using a shortcode.
Preserve Code Formatting Developer Profile
63 plugins · 92K total installs
How We Detect Preserve Code Formatting
Patterns used to identify this plugin on WordPress sites during automated security audits and web crawling.
Asset Fingerprints
/wp-content/plugins/preserve-code-formatting/css/preserve-code-formatting.css/wp-content/plugins/preserve-code-formatting/js/preserve-code-formatting.js/wp-content/plugins/preserve-code-formatting/js/preserve-code-formatting.jspreserve-code-formatting/css/preserve-code-formatting.css?ver=preserve-code-formatting/js/preserve-code-formatting.js?ver=HTML / DOM Fingerprints
<!-- CODE BLOCK START --><!-- CODE BLOCK END -->