84% adapta-rgpd

Code Review | Adapta RGPD

WordPress plugin Adapta RGPD scored84%from 54 tests.

About plugin

  • Plugin page: adapta-rgpd
  • Plugin version: 1.3.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: May 27, 2018
  • Latest release: Nov 20, 2023
  • Number of updates: 120
  • Update frequency: every 16.7 days
  • Top authors: cesarmaeso (100%)

Code review

54 tests

User reviews

97 reviews

Install metrics

50,000+ active /272,837 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.76MB] [CPU: ▲1.23ms] Passed 4 tests

Analyzing server-side resources used by Adapta RGPD
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.7544.91 ▲7.77
Dashboard /wp-admin4.06 ▲0.7656.37 ▲8.91
Posts /wp-admin/edit.php4.12 ▲0.7647.22 ▼5.56
Add New Post /wp-admin/post-new.php6.65 ▲0.7693.85 ▼6.19
Media Library /wp-admin/upload.php3.99 ▲0.7641.03 ▲9.78
Ajustes /wp-admin/admin.php?page=argpd-home4.1840.43
Consentimientos /wp-admin/admin.php?page=argpd-consents4.1834.56
Clave de API /wp-admin/admin.php?page=argpd-addons4.1835.91

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 144 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Adapta RGPD
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7314.72 ▲0.381.73 ▼0.1742.45 ▲1.57
Dashboard /wp-admin2,240 ▲635.68 ▼0.0391.88 ▼8.6540.24 ▼4.76
Posts /wp-admin/edit.php2,145 ▲452.23 ▲0.2438.46 ▼4.4236.15 ▼0.64
Add New Post /wp-admin/post-new.php1,565 ▲3623.08 ▼0.24626.11 ▲19.6469.92 ▲18.96
Media Library /wp-admin/upload.php1,448 ▲454.25 ▲0.0198.02 ▼6.3345.03 ▼0.56
Ajustes /wp-admin/admin.php?page=argpd-home8791.7223.2739.75
Consentimientos /wp-admin/admin.php?page=argpd-consents8881.9640.4535.49
Clave de API /wp-admin/admin.php?page=argpd-addons8791.6726.6533.14

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Source' not found in wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Source/FilesystemSource.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Loader/InlineLoader.php:50
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Loader/FilesystemLoader.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Logger' not found in wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Logger/AbstractLogger.php:21
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/adapta-rgpd/tests/bootstrap.php on line 13
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Exception' not found in wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Exception/UnknownTemplateException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Loader/StringLoader.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Loader_FilesystemLoader' not found in wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Loader/ProductionFilesystemLoader.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Exception' not found in wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Exception/UnknownHelperException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Cache' not found in wp-content/plugins/adapta-rgpd/lib/vendor/Mustache/Cache/AbstractCache.php:19

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: privacidad, legal, rgpd, cookies, lopd

adapta-rgpd/adapta-rgpd.php 92% from 13 tests

This is the main PHP file of "Adapta RGPD" version 1.3.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 plugin17,472 lines of code in 135 files:
LanguageFilesBlank linesComment linesLines of code
JSON56007,368
PHP501,1243,3296,151
PO File14975171,588
CSS14221481,110
Mustache10229641,094
JavaScript24371151
Markdown22010

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.63
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces6
Traits0
Classes40
▷ Abstract classes37.50%
▷ Concrete classes3792.50%
▷ Final classes12.70%
Methods312
▷ Static methods92.88%
▷ Public methods25782.37%
▷ Protected methods165.13%
▷ Private methods3912.50%
Functions14
▷ Named functions642.86%
▷ Anonymous functions857.14%
Constants68
▷ Global constants00.00%
▷ Class constants68100.00%
▷ Public constants68100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/moderno-claro.png17.53KB8.80KB▼ 49.80%
assets/images/clasico.png18.85KB9.01KB▼ 52.18%
assets/images/moderno-oscuro-columnas.png19.21KB9.58KB▼ 50.10%
assets/images/moderno-oscuro.png17.81KB8.63KB▼ 51.51%