10% implied-cookie-consent

Code Review | Implied Cookie Consent

WordPress plugin Implied Cookie Consent scored10%from 54 tests.

About plugin

  • Plugin page: implied-cookie-co...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Sep 26, 2013
  • Latest release: Feb 2, 2021
  • Number of updates: 43
  • Update frequency: every 62.6 days
  • Top authors: Senktec (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /9,373 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/implied-cookie-consent/icc-admin.php+39
    Undefined variable: opt_name

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

A check of server-side resources used by Implied Cookie Consent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.24 ▼5.19
Dashboard /wp-admin3.32 ▲0.0144.07 ▼2.58
Posts /wp-admin/edit.php3.37 ▲0.0148.09 ▲0.44
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.57 ▼13.04
Media Library /wp-admin/upload.php3.24 ▲0.0134.73 ▲0.01

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Implied Cookie Consent
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,040 ▲29414.20 ▼0.029.52 ▲7.5540.63 ▼8.13
Dashboard /wp-admin2,229 ▲445.99 ▲0.12101.99 ▲3.4638.91 ▲3.19
Posts /wp-admin/edit.php2,117 ▲252.31 ▲0.3141.44 ▼1.1334.24 ▼3.78
Add New Post /wp-admin/post-new.php1,540 ▲1218.28 ▼0.12661.04 ▲17.8835.07 ▼30.05
Media Library /wp-admin/upload.php1,411 ▲234.38 ▲0.0998.10 ▲5.8539.01 ▼0.80
Implied Cookie Consent /wp-admin/implied-cookie-consent.php260.440.1213.13

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 does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
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/implied-cookie-consent/icc-admin.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/implied-cookie-consent/implied-cookie-consent.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/implied-cookie-consent.php
    • > Network (severe)
    wp-admin/implied-cookie-consent.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: cookie warning, cookie law, cookie consent

implied-cookie-consent/implied-cookie-consent.php Passed 13 tests

The principal PHP file in "Implied Cookie Consent" v. 1.3 is loaded by WordPress automatically on each request
81 characters long description:
Displays an unobtrusive cookie information bar when a user first visits the site.

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
Good job! No executable or dangerous file extensions detected272 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP23522145
JavaScript32815110
CSS12017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
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 functions220.00%
▷ Anonymous functions880.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin