sandywp / plugins / wp-anti-clickjack

WP Anti-Clickjack

5.0 out of 5 stars. 5.0 3 reviews

Protect Your WordPress Site From Clickjacking Attacks by Adding the X-Frame-Options Header and Owasp's Legacy Browser Frame Breaking Script.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v1.8.0 4,000+ installs WP 5.0.0+

your-sandbox.sandywp.com/wp-admin
WP Anti-Clickjack running inside a SandyWP sandbox

About this plugin

WP Anti-Clickjack is a powerful security plugin that helps prevent your WordPress site from being vulnerable to clickjacking attacks. Clickjacking is a malicious technique where an attacker tricks users into clicking on a concealed link or button by overlaying it on your legitimate website.

This plugin implements two key defense mechanisms:

  1. X-Frame-Options Header: The plugin adds the X-Frame-Options: SAMEORIGIN HTTP header to your site’s responses. This header instructs web browsers to prevent other websites from embedding your site within an iframe, effectively blocking clickjacking attempts.

  2. OWASP’s Legacy Browser Frame Breaking Script: The plugin includes a modified version of OWASP’s legacy browser frame breaking script. This script prevents other sites from putting your site in an iframe, even in browsers that don’t support the X-Frame-Options header. The script is optimized to work seamlessly in browsers with and without JavaScript enabled.

By combining these two security measures, WP Anti-Clickjack provides comprehensive protection against clickjacking attacks, ensuring the safety and integrity of your WordPress site.

For more information about clickjacking defense techniques, refer to the OWASP Clickjacking Defense Cheat Sheet.

Features

  • Adds the X-Frame-Options: SAMEORIGIN HTTP header to prevent clickjacking
  • Includes a modified version of OWASP’s legacy browser frame breaking script
  • Compatible with popular page builders and editors like Elementor, Divi, WPBakery, Bricks, Breakdance, Oxygen, and more
  • Provides filters to disable the anti-clickjacking measures when needed
  • Easy to install and configure
  • Regularly updated and tested with the latest WordPress versions

Additional Details

If you need to disable the clickjacking JavaScript on a specific page, you can use the following filter in your theme’s functions.php file:

add_filter('wp_anti_clickjack', '__return_false');

To disable the clickjacking X-Frame-Options HTTP header, use this filter in your theme’s functions.php file:

add_filter('wp_anti_clickjack_x_frame_options_header', '__return_false');

Questions

Does this plugin affect my site’s performance?

No, WP Anti-Clickjack is designed to have minimal impact on your site’s performance. The anti-clickjacking measures are applied efficiently without causing any significant overhead.

Is this plugin compatible with page builders and editors?

Yes, WP Anti-Clickjack is compatible with popular page builders and editors such as Elementor, Divi, WPBakery, Thrive Architect, and more. If you encounter any compatibility issues, please contact me for assistance.

Can I customize the anti-clickjacking behavior?

Yes, the plugin provides filters that allow you to disable the clickjacking JavaScript and the X-Frame-Options header when needed. You can use these filters in your theme’s functions.php file to fine-tune the plugin’s behavior.

5.0

3 reviews

  • 5 ★ 3
  • 4 ★ 0
  • 3 ★ 0
  • 2 ★ 0
  • 1 ★ 0

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.