84% responsive-cookie-consent

Code Review | Responsive Cookie Consent

WordPress plugin Responsive Cookie Consent scored84%from 54 tests.

About plugin

  • Plugin page: responsive-cookie...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.2
  • WordPress version: 6.3.1
  • First release: Dec 14, 2015
  • Latest release: Apr 23, 2023
  • Number of updates: 43
  • Update frequency: every 62.5 days
  • Top authors: JamesKoussertari (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

3,000+ active /22,381 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.61ms] Passed 4 tests

Server-side resources used by Responsive Cookie Consent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.82 ▼4.34
Dashboard /wp-admin3.37 ▲0.0749.12 ▲3.07
Posts /wp-admin/edit.php3.42 ▲0.0649.75 ▲0.83
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.51 ▼8.47
Media Library /wp-admin/upload.php3.29 ▲0.0635.80 ▲1.55
RCC /wp-admin/options-general.php?page=rcc-settings3.2732.40

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Cookie Consent
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲17613.81 ▼0.586.87 ▲4.9044.03 ▲0.17
Dashboard /wp-admin2,233 ▲455.07 ▼0.79106.66 ▲3.5842.65 ▲2.89
Posts /wp-admin/edit.php2,118 ▲262.31 ▲0.3135.70 ▼8.0032.58 ▼3.84
Add New Post /wp-admin/post-new.php1,542 ▲2823.30 ▲5.73618.06 ▼2.7633.74 ▼9.55
Media Library /wp-admin/upload.php1,418 ▲304.50 ▲0.27101.93 ▲2.2142.90 ▼2.15
RCC /wp-admin/options-general.php?page=rcc-settings1,6352.8468.6628.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/responsive-cookie-consent/rcc.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-cookie-consent/includes/register-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-cookie-consent/includes/enqueue.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-cookie-consent/includes/admin-menu.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: responsive cookie consent, eu cookie law, cookie consent, responsive cookie banner, cookie banner...

responsive-cookie-consent/rcc.php 92% from 13 tests

The main PHP script in "Responsive Cookie Consent" version 2.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("responsive-cookie-consent.php" instead of "rcc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin419 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP610160293
CSS20299
JavaScript217327

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin