84% simple-cookie-notification

Code Review | GDPR Simple Notification

WordPress plugin GDPR Simple Notification scored84%from 54 tests.

About plugin

  • Plugin page: simple-cookie-not...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 27, 2018
  • Latest release: Oct 18, 2018
  • Number of updates: 13
  • Update frequency: every 8.7 days
  • Top authors: b4after (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /720 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.07ms] Passed 4 tests

Server-side resources used by GDPR Simple Notification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.92 ▲5.09
Dashboard /wp-admin3.45 ▲0.1547.83 ▲1.23
Posts /wp-admin/edit.php3.57 ▲0.2144.73 ▼2.70
Add New Post /wp-admin/post-new.php6.05 ▲0.1781.24 ▼13.10
Media Library /wp-admin/upload.php3.38 ▲0.1535.38 ▼9.72

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

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

Browser metrics Passed 4 tests

Checking browser requirements for GDPR Simple Notification
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲22813.67 ▼0.985.85 ▲3.9843.38 ▲3.40
Dashboard /wp-admin2,226 ▲415.84 ▲0.7797.92 ▼6.0639.16 ▼10.71
Posts /wp-admin/edit.php2,109 ▲202.02 ▲0.0037.67 ▲0.7233.36 ▲1.37
Add New Post /wp-admin/post-new.php1,538 ▲1423.33 ▲0.15590.71 ▼99.3354.59 ▼0.51
Media Library /wp-admin/upload.php1,408 ▲204.30 ▲0.1193.17 ▼8.4039.54 ▼5.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-cookie-notification/libs/ba_cookies_functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-cookie-notification/libs/ba_cookies_functions.php:10

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 96% from 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
5 plugin tags: gdpr, cookies, privacy, privacy policy, cookie law

simple-cookie-notification/simple-cookie-notification.php 92% from 13 tests

The main PHP script in "GDPR Simple Notification" version 1.3.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

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 detected1,005 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP12270353793
LESS213298
JavaScript2401245
SVG10145
JSON20022
CSS2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.17
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods53
▷ Static methods59.43%
▷ Public methods5196.23%
▷ Protected methods00.00%
▷ Private methods23.77%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants5
▷ Global constants5100.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