84% gdpr-toolbox

Code Review | GDPR Toolbox

WordPress plugin GDPR Toolbox scored84%from 54 tests.

About plugin

  • Plugin page: gdpr-toolbox
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 6, 2023
  • Latest release: Mar 10, 2023
  • Number of updates: 8
  • Update frequency: every 1.1 days
  • Top authors: c2cero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /197 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.97ms] Passed 4 tests

An overview of server-side resources used by GDPR Toolbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0248.83 ▲7.34
Dashboard /wp-admin3.33 ▲0.0349.78 ▼8.97
Posts /wp-admin/edit.php3.38 ▲0.0349.94 ▼1.68
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.82 ▼0.58
Media Library /wp-admin/upload.php3.26 ▲0.0337.84 ▲3.35

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for GDPR Toolbox
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.67 ▼0.051.84 ▲0.1844.24 ▼5.02
Dashboard /wp-admin2,195 ▲155.56 ▼0.1184.19 ▼7.6839.33 ▼1.24
Posts /wp-admin/edit.php2,100 ▼02.09 ▲0.0735.64 ▲0.5735.11 ▼3.42
Add New Post /wp-admin/post-new.php1,526 ▼222.78 ▼0.88647.60 ▼30.8651.33 ▼11.44
Media Library /wp-admin/upload.php1,403 ▲64.22 ▲0.06103.94 ▲2.0244.73 ▼1.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gdpr-toolbox/gdpr-toolbox.php:42

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Description of the second screenshot.)
The official readme.txt is a good inspiration

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

"GDPR Toolbox" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
90 characters long description:
This plugin adds a new checkbox to the comment form for compliance with the european GDPR.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin97 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1233772
PO File17425

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.07
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods746.67%
▷ Public methods746.67%
▷ Protected methods853.33%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin