82% gdpr-compliant-recaptcha-for-all-forms

Code Review | GDPR-compliant ReCaptcha for all forms and logins

WordPress plugin GDPR-compliant ReCaptcha for all forms and logins scored82%from 54 tests.

About plugin

  • Plugin page: gdpr-compliant-re...
  • Plugin version: 3.5.4
  • PHP compatiblity: PHP-Version 5.6++
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8+-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2022
  • Latest release: Nov 17, 2023
  • Number of updates: 73
  • Update frequency: every 5.0 days
  • Top authors: matthiasnordwig (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

800+ active /8,758 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.83MB] [CPU: ▲7.49ms] Passed 4 tests

This is a short check of server-side resources used by GDPR-compliant ReCaptcha for all forms and logins
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.8255.29 ▲13.17
Dashboard /wp-admin4.21 ▲0.9093.79 ▲38.52
Posts /wp-admin/edit.php4.24 ▲0.8855.39 ▲8.67
Add New Post /wp-admin/post-new.php6.71 ▲0.8292.94 ▼6.88
Media Library /wp-admin/upload.php4.05 ▲0.8251.68 ▲15.00
Trash0 /wp-admin/admin.php?page=gdpr_pow_trash4.0244.72
Analytic Box0 /wp-admin/admin.php?page=gdpr_pow_analyse4.0242.32
ReCaptcha GDPR Compliant /wp-admin/options-general.php?page=gdpr_pow_options4.0246.57
Spam0 /wp-admin/admin.php?page=gdpr_pow_spam4.0240.01
Messages0 /wp-admin/admin.php?page=gdpr_pow_messages4.0243.58

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: 3 new tables, 30 new options
New tables
wp_recaptcha_gdpr_message_rgm
wp_recaptcha_gdpr_details_rgd
wp_recaptcha_gdpr_stamp_rgs
New WordPress options
gdpr_pow_pow_version
widget_recent-comments
gdpr_pow_pow_installed
gdpr_pow_pow_menu_position
gdpr_pow_pow_cron_delete_trash
gdpr_pow_pow_time_window
gdpr_pow_pow_dashboard
can_compress_scripts
db_upgraded
widget_recent-posts
...

Browser metrics Passed 4 tests

GDPR-compliant ReCaptcha for all forms and logins: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17614.68 ▲0.301.92 ▲0.2427.99 ▼16.08
Dashboard /wp-admin2,315 ▲1355.65 ▼0.0297.75 ▼1.4046.32 ▲3.98
Posts /wp-admin/edit.php2,150 ▲501.95 ▼0.0134.56 ▼10.2831.34 ▼10.48
Add New Post /wp-admin/post-new.php1,572 ▲3323.27 ▲0.19696.76 ▲45.3364.78 ▲10.93
Media Library /wp-admin/upload.php1,447 ▲444.26 ▲0.09100.42 ▼0.5745.85 ▼0.23
Trash0 /wp-admin/admin.php?page=gdpr_pow_trash9282.0026.6827.57
Analytic Box0 /wp-admin/admin.php?page=gdpr_pow_analyse9632.0026.7449.27
ReCaptcha GDPR Compliant /wp-admin/options-general.php?page=gdpr_pow_options2,5021.6624.7476.14
Spam0 /wp-admin/admin.php?page=gdpr_pow_spam9202.1523.5024.56
Messages0 /wp-admin/admin.php?page=gdpr_pow_messages9232.0027.1926.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gdpr-compliant-recaptcha-for-all-forms/includes/class-settings-menu.php
    • > /wp-content/plugins/gdpr-compliant-recaptcha-for-all-forms/uninstall.php
    • > /wp-content/plugins/gdpr-compliant-recaptcha-for-all-forms/recaptcha-gdpr-compliant.php
    • > /wp-content/plugins/gdpr-compliant-recaptcha-for-all-forms/includes/class-dashboard-widget.php
    • > /wp-content/plugins/gdpr-compliant-recaptcha-for-all-forms/includes/class-option.php
    • > /wp-content/plugins/gdpr-compliant-recaptcha-for-all-forms/includes/class-analysis.php
    • > /wp-content/plugins/gdpr-compliant-recaptcha-for-all-forms/includes/class-message-page.php
    • > /wp-content/plugins/gdpr-compliant-recaptcha-for-all-forms/includes/class-stamp.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Requires at least: Invalid version format
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

gdpr-compliant-recaptcha-for-all-forms/recaptcha-gdpr-compliant.php 69% from 13 tests

This is the main PHP file of "GDPR-compliant ReCaptcha for all forms and logins" version 3.5.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gdpr-compliant-recaptcha-for-all-forms.php" instead of "recaptcha-gdpr-compliant.php")
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "4.8+")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Requires PHP: Please use periods and digits for the required version (ex. "7.0" instead of "PHP-Version 5.6+")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected5,014 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP85115043,444
JavaScript4124118887
PO File158124433
CSS4364250

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 code0.44
Average class complexity42.62
▷ Minimum class complexity5.00
▷ Maximum class complexity127.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods96
▷ Static methods1111.46%
▷ Public methods8184.38%
▷ Protected methods00.00%
▷ Private methods1515.62%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants47
▷ Global constants12.13%
▷ Class constants4697.87%
▷ Public constants46100.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