83% bst-dsgvo-cookie

Code Review | BST DSGVO Cookie

WordPress plugin BST DSGVO Cookie scored 83% from 54 tests.

About plugin

  • Plugin page: bst-dsgvo-cookie
  • Plugin version: 1.2.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2018
  • Latest release: Sep 19, 2021
  • Number of updates: 39
  • Update frequency: every 32.0 days
  • Top authors: amargolf (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

8,000+ active / 71,132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by BST DSGVO Cookie
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.55 ▲0.02
Dashboard /wp-admin3.32 ▲0.0156.74 ▼18.27
Posts /wp-admin/edit.php3.37 ▲0.0155.24 ▲3.22
Add New Post /wp-admin/post-new.php5.92 ▲0.03120.27 ▲27.57
Media Library /wp-admin/upload.php3.24 ▲0.0145.64 ▲3.77
BST DSGVO Cookie /wp-admin/options-general.php?page=bst-settings3.2236.83

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for BST DSGVO Cookie
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲13013.79 ▲0.6110.95 ▲8.7141.82 ▼2.79
Dashboard /wp-admin2,233 ▲245.07 ▲0.22111.38 ▼5.6141.31 ▼2.30
Posts /wp-admin/edit.php2,121 ▲322.32 ▲0.3141.32 ▲5.6636.29 ▼1.95
Add New Post /wp-admin/post-new.php1,535 ▲223.30 ▼0.07791.83 ▲131.4337.81 ▼14.93
Media Library /wp-admin/upload.php1,418 ▲304.35 ▲0.19110.12 ▼2.9548.08 ▼0.24
BST DSGVO Cookie /wp-admin/options-general.php?page=bst-settings1,9642.6784.3134.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 4× 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/bst-dsgvo-cookie/includes/enqueue.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bst-dsgvo-cookie/includes/admin-menu.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bst-dsgvo-cookie/bst.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bst-dsgvo-cookie/includes/register-settings.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #2, #4 in bst-dsgvo-cookie/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can take inspiration from this readme.txt

bst-dsgvo-cookie/bst.php 92% from 13 tests

The primary PHP file in "BST DSGVO Cookie" version 1.2.9 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("bst-dsgvo-cookie.php" instead of "bst.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,241 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32733051,114
CSS4992589
PHP612048462
PO File1303476

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/img/eu-info.png1.67KB1.56KB▼ 6.15%