WP Manifestindependent plugin directory
manifest / privacy / wordpress-email-obfuscator

WP Email Obfuscation

Encrypts email addresses and reveals them via JavaScript on user interaction

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/marthaarman/wordpress-email-obfuscator/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin that encrypts email addresses to protect them from spam harvesters, then reveals them via JavaScript when users interact with the page.

Features

  • XOR Encryption: Uses XOR cipher with Base64 encoding to encrypt email addresses
  • Multiple Triggers: Emails reveal on:
    • Mouse movement
    • Page scrolling
    • Click events
    • Keypress events
    • Auto-reveal after 5 seconds
  • Comprehensive Coverage: Protects emails in:
    • Post/page content
    • Excerpts
    • Widget text
    • Comments
    • Mailto: links
  • Multi-language Support: Automatically detects WordPress locale and shows appropriate language (English, Dutch)

Installation

  1. Upload the wp-email-obfuscation folder to your /wp-content/plugins/ directory
  2. Activate the plugin through the "Plugins" menu in WordPress
  3. Email addresses will automatically be obfuscated

How It Works

  1. The PHP component scans content for email addresses using regex
  2. Found emails are encrypted using XOR cipher and Base64 encoding
  3. Emails are replaced with <span> elements containing the encrypted data
  4. The JavaScript component listens for user interactions
  5. When triggered, JavaScript decrypts and reveals the email addresses

Security Notes

  • This plugin protects against simple email harvesters that don't execute JavaScript
  • Sophisticated scrapers with JavaScript execution can still harvest emails
  • For maximum protection, consider using contact forms instead of displaying emails directly

Technical Details

  • Encryption Method: XOR cipher with key wp-email-obf-key
  • Encoding: Base64 for safe HTML attribute storage
  • Event Debouncing: 100ms debounce on mousemove and scroll events
  • Multi-language Support: Simple translation array supporting English (en) and Dutch (nl)
  • Locale Detection: Automatically detects WordPress locale and shows appropriate language
  • Fallback: English text shown for unsupported languages

Requirements

  • WordPress 4.0 or higher
  • PHP 5.6 or higher
  • JavaScript enabled in user's browser

AI Disclaimer

This WordPress plugin was developed with assistance from artificial intelligence (Cascade AI by Cognition). While the AI helped generate the initial code structure and implementation, the code has been reviewed, tested, and modified by human developers to ensure it meets the project requirements and follows best practices.

The AI assistance was used for:

  • Initial plugin architecture design
  • PHP encryption logic implementation
  • JavaScript decryption and event handling
  • Documentation and README content

Human oversight was involved in:

  • Testing the obfuscation functionality
  • Fixing mailto link handling issues
  • Ensuring proper WordPress integration
  • Version control and deployment

License

This plugin is free to use and modify.