83% gdpr-for-ninja-forms

Code Review | Ninja Forms: GDPR Framework Add-On

WordPress plugin Ninja Forms: GDPR Framework Add-On scored83%from 54 tests.

About plugin

  • Plugin page: gdpr-for-ninja-forms
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Feb 26, 2019
  • Latest release: Mar 30, 2023
  • Number of updates: 20
  • Update frequency: every 74.7 days
  • Top authors: data443 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,776 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.47ms] Passed 4 tests

A check of server-side resources used by Ninja Forms: GDPR Framework Add-On
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.73 ▲3.22
Dashboard /wp-admin3.31 ▲0.0047.38 ▼3.32
Posts /wp-admin/edit.php3.36 ▲0.0051.30 ▲0.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.77 ▼15.63
Media Library /wp-admin/upload.php3.23 ▲0.0039.51 ▲0.90

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ninja Forms: GDPR Framework Add-On
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▼0.131.81 ▲0.0844.68 ▲1.80
Dashboard /wp-admin2,195 ▲185.57 ▼0.1494.05 ▲0.3941.53 ▼5.09
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0539.98 ▼3.4536.46 ▼0.91
Add New Post /wp-admin/post-new.php1,679 ▲15322.44 ▼0.65664.14 ▲6.2555.80 ▲3.59
Media Library /wp-admin/upload.php1,394 ▼94.19 ▼0.0299.02 ▼2.5447.74 ▼1.36

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/gdpr-for-ninja-forms/ninjaforms-gdpr.php on line 15
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/gdpr-for-ninja-forms/ninjaforms-gdpr.php on line 15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gdpr-for-ninja-forms/ninjaforms-gdpr.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: privacy, ninja forms, compliance, gdpr, security...

gdpr-for-ninja-forms/ninjaforms-gdpr.php 77% from 13 tests

The main PHP script in "Ninja Forms: GDPR Framework Add-On" version 2.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.3" instead of "5.6")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gdpr-for-ninja-forms.php" instead of "ninjaforms-gdpr.php")
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected462 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP766103462

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity20.67
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes266.67%
Methods23
▷ Static methods28.70%
▷ Public methods2295.65%
▷ Protected methods14.35%
▷ Private methods00.00%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin