84% cookie-wow-banner

Code Review | Cookie Wow PDPA Banner

WordPress plugin Cookie Wow PDPA Banner scored84%from 54 tests.

About plugin

  • Plugin page: cookie-wow-banner
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.16-6.0
  • WordPress version: 6.3.1
  • First release: Jun 29, 2021
  • Latest release: May 26, 2022
  • Number of updates: 18
  • Update frequency: every 18.4 days
  • Top authors: jsice (50%)typhoondw (33.33%)datawow (27.78%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /4,708 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.64ms] Passed 4 tests

Server-side resources used by Cookie Wow PDPA Banner
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.69 ▲0.81
Dashboard /wp-admin3.33 ▼0.0147.49 ▼13.71
Posts /wp-admin/edit.php3.39 ▲0.0346.61 ▼1.71
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.97 ▼19.95
Media Library /wp-admin/upload.php3.26 ▲0.0336.99 ▲2.97
Cookie Wow /wp-admin/options-general.php?page=cookiewow-settings3.2231.18

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

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

Browser metrics Passed 4 tests

Cookie Wow PDPA Banner: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.31 ▲0.142.02 ▲0.4543.34 ▲3.02
Dashboard /wp-admin2,199 ▲225.55 ▼0.1181.31 ▼5.2039.28 ▼4.03
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0533.92 ▼4.2834.01 ▼1.12
Add New Post /wp-admin/post-new.php1,536 ▲1022.52 ▼1.10675.91 ▼5.3862.44 ▲5.13
Media Library /wp-admin/upload.php1,407 ▲134.16 ▼0.0095.43 ▼10.8644.14 ▼5.93
Cookie Wow /wp-admin/options-general.php?page=cookiewow-settings1,0912.0327.4246.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/cookie-wow-banner/settings.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cookie-wow-banner/cookiewow-wordpress.php:195

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: cookie, pdpa

cookie-wow-banner/cookiewow-wordpress.php 92% from 13 tests

"Cookie Wow PDPA Banner" version 1.1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cookie-wow-banner.php" instead of "cookiewow-wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin410 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33070202
SVG100121
CSS116087

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin