84% inventivo-cookie-notice

Code Review | Cookie Notice | inventivo

WordPress plugin Cookie Notice | inventivo scored84%from 54 tests.

About plugin

  • Plugin page: inventivo-cookie-...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2018
  • Latest release: Apr 30, 2021
  • Number of updates: 82
  • Update frequency: every 13.5 days
  • Top authors: inventivode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,269 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by Cookie Notice | inventivo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0729.34 ▼10.39
Dashboard /wp-admin3.34 ▲0.0345.85 ▼8.28
Posts /wp-admin/edit.php3.39 ▲0.0346.61 ▼5.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.94 ▼25.23
Media Library /wp-admin/upload.php3.26 ▲0.0338.07 ▲2.64
Cookie Notice | inventivo /wp-admin/options-general.php?page=inventivo_cookienotice_setting_admin3.2026.71

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Cookie Notice | inventivo
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,995 ▲23413.45 ▼0.9112.04 ▲10.3743.01 ▼3.95
Dashboard /wp-admin2,247 ▲705.53 ▼0.1385.02 ▼5.5869.81 ▲26.41
Posts /wp-admin/edit.php2,155 ▲552.12 ▲0.1038.27 ▲1.9935.35 ▲0.57
Add New Post /wp-admin/post-new.php1,732 ▲20522.47 ▼0.52763.28 ▲126.8773.85 ▲17.89
Media Library /wp-admin/upload.php1,446 ▲494.24 ▲0.11102.06 ▲4.7669.50 ▲26.42
Cookie Notice | inventivo /wp-admin/options-general.php?page=inventivo_cookienotice_setting_admin1,0222.2025.1330.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=inventivo_cookienotice_setting_admin
    • > Notice in wp-content/plugins/inventivo-cookie-notice/inventivo-cookie-notice.php+503
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=inventivo_cookienotice_setting_admin
    • > Notice in wp-content/plugins/inventivo-cookie-notice/inventivo-cookie-notice.php+506
    Undefined variable: selected1
    • > GET request to /wp-admin/options-general.php?page=inventivo_cookienotice_setting_admin
    • > Notice in wp-content/plugins/inventivo-cookie-notice/inventivo-cookie-notice.php+507
    Undefined variable: selected2
    • > GET request to /wp-admin/options-general.php?page=inventivo_cookienotice_setting_admin
    • > Notice in wp-content/plugins/inventivo-cookie-notice/inventivo-cookie-notice.php+508
    Undefined variable: selected3
    • > GET request to /wp-admin/options-general.php?page=inventivo_cookienotice_setting_admin
    • > Notice in wp-content/plugins/inventivo-cookie-notice/inventivo-cookie-notice.php+509
    Undefined variable: selected4

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: cookie popup, cookie notice, inventivo, cookie hinweis

inventivo-cookie-notice/inventivo-cookie-notice.php Passed 13 tests

The main file in "Cookie Notice | inventivo" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
34 characters long description:
Display a Cookie Notice in a popup

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,030 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP18357435
PO File288102241
Sass660153
JavaScript22615143
Markdown127035
XML10017
CSS6006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 2.04MB with 1.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png698.00KB270.18KB▼ 61.29%
screenshot-4.png623.18KB242.22KB▼ 61.13%
screenshot-2.png95.23KB43.82KB▼ 53.98%
screenshot-3.png639.57KB233.36KB▼ 63.51%
admin/images/icon-256x256-1.png33.55KB11.45KB▼ 65.87%