89% asesor-cookies-para-la-ley-en-espana

Code Review | Asesor de Cookies RGPD para normativa europea

WordPress plugin Asesor de Cookies RGPD para normativa europea scored89%from 54 tests.

About plugin

  • Plugin page: asesor-cookies-pa...
  • Plugin version: 0.34
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Oct 13, 2013
  • Latest release: Aug 21, 2023
  • Number of updates: 67
  • Update frequency: every 53.7 days
  • Top authors: cdoral (100%)

Code review

54 tests

User reviews

59 reviews

Install metrics

40,000+ active /652,894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.78ms] Passed 4 tests

A check of server-side resources used by Asesor de Cookies RGPD para normativa europea
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.39 ▼5.10
Dashboard /wp-admin3.39 ▲0.0955.24 ▲0.09
Posts /wp-admin/edit.php3.51 ▲0.1553.07 ▼1.69
Add New Post /wp-admin/post-new.php5.99 ▲0.1196.26 ▼3.01
Media Library /wp-admin/upload.php3.32 ▲0.0935.77 ▼1.30
Asesor de cookies /wp-admin/tools.php?page=cdp_cookies3.3034.57

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Asesor de Cookies RGPD para normativa europea: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.54 ▼0.7711.00 ▲9.2153.35 ▲6.66
Dashboard /wp-admin2,209 ▲295.68 ▲0.0587.76 ▼12.0641.56 ▼6.90
Posts /wp-admin/edit.php2,114 ▲112.04 ▲0.0241.63 ▲0.3536.11 ▼3.21
Add New Post /wp-admin/post-new.php1,536 ▼917.65 ▼5.62649.74 ▼44.6556.65 ▼2.72
Media Library /wp-admin/upload.php1,414 ▲144.23 ▲0.0497.05 ▼12.0845.92 ▼1.05
Asesor de cookies /wp-admin/tools.php?page=cdp_cookies1,1451.8424.1137.74

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 were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: policy, spain, law, politica, espaa...

asesor-cookies-para-la-ley-en-espana/plugin.php 85% from 13 tests

"Asesor de Cookies RGPD para normativa europea" version 0.34's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 240 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("asesor-cookies-para-la-ley-en-espana.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,468 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS21645531
PHP472229432
HTML42313308
JavaScript24968194
Markdown1203

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.36
Average class complexity9.29
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods2291.67%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected