83% wf-cookie-consent

Code Review | WF Cookie Consent

WordPress plugin WF Cookie Consent scored83%from 54 tests.

About plugin

  • Plugin page: wf-cookie-consent
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: May 22, 2015
  • Latest release: May 12, 2022
  • Number of updates: 69
  • Update frequency: every 36.9 days
  • Top authors: wunderfarm (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

20,000+ active /649,569 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by WF Cookie Consent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.83 ▲5.01
Dashboard /wp-admin3.37 ▲0.0345.79 ▼13.43
Posts /wp-admin/edit.php3.42 ▲0.0743.23 ▼4.13
Add New Post /wp-admin/post-new.php5.95 ▲0.0783.14 ▼11.61
Media Library /wp-admin/upload.php3.29 ▲0.0740.21 ▲4.63
WF Cookie Consent /wp-admin/options-general.php?page=wf-cookieconsent3.2631.39

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WF Cookie Consent
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11114.46 ▲0.153.24 ▲1.3143.82 ▼1.65
Dashboard /wp-admin2,210 ▲184.84 ▼0.08113.33 ▼2.5543.57 ▲2.29
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0334.40 ▼7.3334.24 ▼2.38
Add New Post /wp-admin/post-new.php1,531 ▲823.19 ▲0.16649.28 ▼38.4651.90 ▼1.56
Media Library /wp-admin/upload.php1,389 ▲44.12 ▼0.09108.43 ▲6.3046.70 ▲1.71
WF Cookie Consent /wp-admin/options-general.php?page=wf-cookieconsent8672.1825.0233.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wf-cookie-consent/wf-cookie-consent.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 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 39 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Example showing the wf-cookie-consent-bar), #2 (WF Cookie Consent options section), #3 (Multi-language support)
  • Plugin Name: Please specify the plugin name on the first line ( === wf-cookie-consent === )
You can take inspiration from this readme.txt

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

The principal PHP file in "WF Cookie Consent" v. 1.2.0 is loaded by WordPress automatically on each request
76 characters long description:
The wunderfarm-way to show how your website complies with the EU Cookie Law.

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin443 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14838288
JavaScript23515155

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.63
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.42MB with 0.30MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png167.23KB46.48KB▼ 72.20%
screenshot-1.png131.17KB48.36KB▼ 63.13%
screenshot-2.png136.55KB35.98KB▼ 73.65%