88% cookie-consent-autoblock

Code Review | Cookie Consent & Autoblock for GDPR/CCPA

WordPress plugin Cookie Consent & Autoblock for GDPR/CCPA scored88%from 54 tests.

About plugin

  • Plugin page: cookie-consent-au...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 22, 2021
  • Latest release: Apr 23, 2021
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: sprucejoy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /633 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.06MB] [CPU: ▼7.18ms] Passed 4 tests

This is a short check of server-side resources used by Cookie Consent & Autoblock for GDPR/CCPA
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.52 ▼13.21
Dashboard /wp-admin3.36 ▲0.0648.20 ▼3.53
Posts /wp-admin/edit.php3.48 ▲0.1248.50 ▼4.53
Add New Post /wp-admin/post-new.php5.94 ▲0.0686.43 ▼7.46
Media Library /wp-admin/upload.php3.29 ▲0.0640.83 ▲6.57
Cookie Consent & Autoblock /wp-admin/options-general.php?page=wpsj-settings3.2835.06

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 16 new options
New WordPress options
wpsprucejoy_reject_button_text
wpsprucejoy_button_color
widget_recent-posts
theysaidso_admin_options
wpsprucejoy_buttontext_color
can_compress_scripts
wpsprucejoy_success_add_scripts
wpsprucejoy_settings
widget_recent-comments
wpsprucejoy_text_color
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cookie Consent & Autoblock for GDPR/CCPA
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲7613.06 ▼1.538.87 ▲6.9547.31 ▲2.20
Dashboard /wp-admin2,201 ▲245.49 ▼0.1889.08 ▼4.2141.84 ▲6.24
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0234.85 ▼1.3037.22 ▲0.21
Add New Post /wp-admin/post-new.php1,531 ▲223.08 ▲0.01695.08 ▲29.3953.10 ▼6.75
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.05112.97 ▲5.7646.54 ▲0.18
Cookie Consent & Autoblock /wp-admin/options-general.php?page=wpsj-settings1,4842.6368.2354.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid plugin version format
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Screenshots: Add an image for screenshot #1 ([TO BE ADD])
You can look at the official readme.txt

cookie-consent-autoblock/wp-sprucejoy.php 77% from 13 tests

"Cookie Consent & Autoblock for GDPR/CCPA" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 178 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cookie-consent-autoblock.php" instead of "wp-sprucejoy.php")

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
Good job! No executable or dangerous file extensions detected665 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12142435459
CSS11215119
Markdown117050
JavaScript10037

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity9.25
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
5 PNG files occupy 0.28MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250-rtl.png66.64KB24.40KB▼ 63.38%
assets/icon-256x256.png22.65KB8.70KB▼ 61.59%
assets/banner-1544x500-rtl.png72.11KB30.43KB▼ 57.80%
assets/banner-772x250.png66.85KB23.97KB▼ 64.15%
assets/banner-1544x500.png55.56KB23.71KB▼ 57.33%