90% wp-anti-clickjack

Code Review | WP Anti-Clickjack

WordPress plugin WP Anti-Clickjack scored90%from 54 tests.

About plugin

  • Plugin page: wp-anti-clickjack
  • Plugin version: 1.7.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3
  • WordPress version: 6.3.1
  • First release: May 26, 2015
  • Latest release: Sep 1, 2023
  • Number of updates: 40
  • Update frequency: every 75.5 days
  • Top authors: someguy9 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /28,201 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼14.49ms] Passed 4 tests

A check of server-side resources used by WP Anti-Clickjack
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0236.84 ▼10.30
Dashboard /wp-admin3.36 ▼0.0244.83 ▼19.74
Posts /wp-admin/edit.php3.42 ▲0.0249.22 ▼5.56
Add New Post /wp-admin/post-new.php5.95 ▲0.0284.99 ▼22.34
Media Library /wp-admin/upload.php3.29 ▲0.0234.11 ▼2.89

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Anti-Clickjack
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.73 ▲0.372.13 ▲0.5136.54 ▼6.94
Dashboard /wp-admin2,201 ▲275.63 ▲0.0494.23 ▼0.9445.61 ▲5.59
Posts /wp-admin/edit.php2,109 ▲91.99 ▲0.0134.85 ▼6.5130.33 ▼6.82
Add New Post /wp-admin/post-new.php1,530 ▼822.88 ▼0.08674.62 ▲47.9554.54 ▲4.27
Media Library /wp-admin/upload.php1,403 ▼04.22 ▼0.0199.82 ▲0.7644.73 ▼0.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: browser frame breaking script, clickjacking, security, anti click jacking

wp-anti-clickjack/wp-anti-clickjack.php Passed 13 tests

Analyzing the main PHP file in "WP Anti-Clickjack" version 1.7.8
124 characters long description:
Plugin to prevent your site from being clickjacked by adding OWASP's legacy browser frame breaking script & X-Frame-Options.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected83 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1191583

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code1.42
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity14.00
▷ Minimum method complexity2.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin