84% cookies-gdpr

Code Review | Cookies GDPR

WordPress plugin Cookies GDPR scored84%from 54 tests.

About plugin

  • Plugin page: cookies-gdpr
  • Plugin version: 1.009
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: May 20, 2023
  • Latest release: Jul 21, 2023
  • Number of updates: 5
  • Update frequency: every 12.4 days
  • Top authors: siriusproio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /253 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.32ms] Passed 4 tests

Analyzing server-side resources used by Cookies GDPR
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.12 ▼1.89
Dashboard /wp-admin3.33 ▲0.0350.71 ▲6.95
Posts /wp-admin/edit.php3.38 ▲0.0345.42 ▲1.03
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.45 ▼1.98
Media Library /wp-admin/upload.php3.26 ▲0.0332.87 ▼2.45

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Cookies GDPR
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.35 ▲0.141.93 ▲0.3037.71 ▼5.78
Dashboard /wp-admin2,210 ▲295.65 ▼0.0288.56 ▼13.5138.21 ▼1.84
Posts /wp-admin/edit.php2,091 ▼92.04 ▲0.0838.03 ▲1.9036.46 ▲4.18
Add New Post /wp-admin/post-new.php1,538 ▼023.23 ▲4.79652.07 ▲11.2253.42 ▼18.94
Media Library /wp-admin/upload.php1,415 ▲154.21 ▼0.00100.09 ▼13.7341.04 ▼8.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/cookies-gdpr/cookies-gdpr.php:13

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: ccpa, rodo, cookie, popup, bar...

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

This is the main PHP file of "Cookies GDPR" version 1.009, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
65 characters long description:
Simply add content and display cookies popup for GDPR compliance.

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 plugin254 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12110129
CSS10092
JavaScript14033

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected