10% gdpr-tools

Code Review | GDPR Tools

WordPress plugin GDPR Tools scored10%from 54 tests.

About plugin

  • Plugin page: gdpr-tools
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 13, 2018
  • Latest release: May 23, 2018
  • Number of updates: 13
  • Update frequency: every 8.5 days
  • Top authors: rolomak (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /6,258 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/gdpr-tools/includes/class-gdpr-tools.php+193
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.58ms] Passed 4 tests

Analyzing server-side resources used by GDPR Tools
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.33 ▼34.40
Dashboard /wp-admin2.05 ▼1.265.43 ▼45.89
Posts /wp-admin/edit.php2.05 ▼1.318.86 ▼41.36
Add New Post /wp-admin/post-new.php2.05 ▼3.846.66 ▼112.68
Media Library /wp-admin/upload.php2.05 ▼1.187.23 ▼27.45

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for GDPR Tools
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲18813.63 ▼0.795.69 ▲3.7845.39 ▼1.05
Dashboard /wp-admin2,218 ▲304.85 ▼1.05106.78 ▼0.7843.96 ▼3.77
Posts /wp-admin/edit.php2,104 ▲152.00 ▼0.0539.04 ▼2.0934.35 ▼0.83
Add New Post /wp-admin/post-new.php1,544 ▲223.38 ▲5.30588.91 ▼8.7152.63 ▲3.88
Media Library /wp-admin/upload.php1,400 ▲154.23 ▼0.0498.64 ▼2.3840.37 ▼2.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/gdpr-tools/includes/class-gdpr-tools.php+193
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gdpr-tools/public/partials/gdpr-tools-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/gdpr-tools/admin/partials/gdpr-tools-admin-settings-page.php:18

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: gdpr, cookie consent

gdpr-tools/gdpr-tools.php Passed 13 tests

"GDPR Tools" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
This plugin helps WP administrators to consent GDPR

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected13,333 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript81,4481,61110,775
PHP233079521,457
CSS56351754
Markdown31190274
JSON22073

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.14
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods97
▷ Static methods1010.31%
▷ Public methods8183.51%
▷ Protected methods00.00%
▷ Private methods1616.49%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/donate.png16.19KB4.48KB▼ 72.32%
admin/img/pro-feature.png2.13KB0.80KB▼ 62.39%
admin/img/get-pro.png6.62KB3.42KB▼ 48.30%
admin/img/pro-version.png17.54KB7.88KB▼ 55.10%