84% gdpr-cookies-pro

Code Review | GDPR Cookies pro

WordPress plugin GDPR Cookies pro scored84%from 54 tests.

About plugin

  • Plugin page: gdpr-cookies-pro
  • Plugin version: 1.3.96
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-5.6
  • WordPress version: 6.3.1
  • First release: Oct 8, 2019
  • Latest release: Dec 17, 2020
  • Number of updates: 80
  • Update frequency: every 5.5 days
  • Top authors: purplelightsoftware (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

800+ active /5,059 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.70ms] Passed 4 tests

Analyzing server-side resources used by GDPR Cookies pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1148.81 ▲0.50
Dashboard /wp-admin3.41 ▲0.1049.13 ▼11.19
Posts /wp-admin/edit.php3.46 ▲0.1051.97 ▼5.66
Add New Post /wp-admin/post-new.php5.99 ▲0.1092.89 ▼14.44
Media Library /wp-admin/upload.php3.33 ▲0.1040.29 ▲1.96

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
gdpr_cookies_pro
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for GDPR Cookies pro
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,023 ▲26213.84 ▼0.8817.37 ▲15.3449.99 ▲7.56
Dashboard /wp-admin2,230 ▲535.65 ▲0.0089.38 ▼11.5038.20 ▼6.19
Posts /wp-admin/edit.php2,135 ▲352.03 ▲0.0834.70 ▼3.9240.32 ▲4.93
Add New Post /wp-admin/post-new.php1,539 ▲923.33 ▲0.23655.93 ▲8.1650.23 ▼6.10
Media Library /wp-admin/upload.php1,436 ▲364.34 ▲0.13100.66 ▲3.7042.55 ▼0.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • gdpr_cookies_pro
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

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 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gdpr-cookies-pro/gdpr-cookies-pro.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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

gdpr-cookies-pro/gdpr-cookies-pro.php Passed 13 tests

The primary PHP file in "GDPR Cookies pro" version 1.3.96 is used by WordPress to initiate all plugin functionality
84 characters long description:
An easy way to get GDPR cookies consent with location filter and fully customizable.

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
Good job! No executable or dangerous file extensions detected1,909 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript516328966
PHP211311650
CSS2444293

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/img/cookie.png1.87KB0.83KB▼ 55.74%
resources/css/gdprcp-transparent-pattern.png1.30KB0.17KB▼ 87.12%