84% simple-cookie-notice

Code Review | Simple Cookie Notice

WordPress plugin Simple Cookie Notice scored84%from 54 tests.

About plugin

  • Plugin page: simple-cookie-notice
  • Plugin version: 1.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 28, 2020
  • Latest release: Mar 31, 2023
  • Number of updates: 16
  • Update frequency: every 70.4 days
  • Top authors: lovecoding (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /4,855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.60ms] Passed 4 tests

Server-side resources used by Simple Cookie Notice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.89 ▲1.29
Dashboard /wp-admin3.39 ▲0.0952.52 ▲1.00
Posts /wp-admin/edit.php3.51 ▲0.1547.00 ▼3.40
Add New Post /wp-admin/post-new.php5.97 ▲0.0994.51 ▲2.50
Media Library /wp-admin/upload.php3.32 ▲0.0936.52 ▼1.29
Privacy Policy /wp-admin/options-general.php?page=privacy-policy3.2936.73

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Cookie Notice
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.28 ▼0.373.32 ▲1.6943.99 ▼0.40
Dashboard /wp-admin2,196 ▲195.57 ▼0.1099.14 ▼2.9346.02 ▲2.71
Posts /wp-admin/edit.php2,104 ▲221.95 ▼0.0335.12 ▼0.3332.66 ▼6.02
Add New Post /wp-admin/post-new.php1,531 ▼423.13 ▲4.95676.86 ▲22.7159.90 ▼5.86
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.0298.98 ▼6.7146.61 ▲1.69
Privacy Policy /wp-admin/options-general.php?page=privacy-policy8802.0423.2730.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simple-cookie-notice/simple-cookie-notice.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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
6 plugin tags: cookies, cookie notice, cookie law, privacy policy, cookie...

simple-cookie-notice/simple-cookie-notice.php 85% from 13 tests

The principal PHP file in "Simple Cookie Notice" v. 1.8 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected351 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34162251
JavaScript113059
CSS18141

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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