89% cookie-accept

Code Review | Cookie Accept - GDPR & CCPA Cookie Consent

WordPress plugin Cookie Accept - GDPR & CCPA Cookie Consent scored89%from 54 tests.

About plugin

  • Plugin page: cookie-accept
  • Plugin version: 2.2.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0.1
  • WordPress version: 6.3.1
  • First release: Mar 31, 2021
  • Latest release: Jul 20, 2022
  • Number of updates: 5
  • Update frequency: every 95.2 days
  • Top authors: niceaddons (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /726 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
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▲0.78ms] Passed 4 tests

Analyzing server-side resources used by Cookie Accept - GDPR & CCPA Cookie Consent
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1946.78 ▼2.13
Dashboard /wp-admin3.50 ▲0.1950.33 ▼0.19
Posts /wp-admin/edit.php3.61 ▲0.2552.64 ▲2.13
Add New Post /wp-admin/post-new.php6.08 ▲0.1997.21 ▲3.38
Media Library /wp-admin/upload.php3.42 ▲0.1940.11 ▲3.29
Cookie Accept /wp-admin/options-general.php?page=cookie-accept3.3945.12

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cookie Accept - GDPR & CCPA Cookie Consent
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.30 ▼1.091.77 ▼0.3843.13 ▲0.48
Dashboard /wp-admin2,210 ▲224.86 ▼0.96106.86 ▼9.7743.55 ▲1.00
Posts /wp-admin/edit.php2,096 ▲102.01 ▼0.0041.08 ▲3.2532.33 ▼3.22
Add New Post /wp-admin/post-new.php1,517 ▼1617.61 ▼5.28680.92 ▲26.1953.53 ▲1.47
Media Library /wp-admin/upload.php1,395 ▲44.22 ▼0.04100.90 ▼11.3043.47 ▼5.84
Cookie Accept /wp-admin/options-general.php?page=cookie-accept2,2661.7227.1551.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Congratulations! This plugin passed the SRP test

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

cookie-accept/cookie-accept.php Passed 13 tests

The main PHP script in "Cookie Accept - GDPR & CCPA Cookie Consent" version 2.2.0 is automatically included on every request by WordPress
115 characters long description:
Cookie Accept is a simple cookie consent, concern and compliance. Get your site ready for GDPR, CCPA or the others.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,281 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP41691961,468
Sass1201657
JavaScript22819138
SVG170017
CSS1001

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity43.75
▷ Minimum class complexity2.00
▷ Maximum class complexity105.00
Average method complexity9.55
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes250.00%
Methods20
▷ Static methods315.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin