84% contenido-rgpd

Code Review | Contenido RGPD

WordPress plugin Contenido RGPD scored84%from 54 tests.

About plugin

  • Plugin page: contenido-rgpd
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Dec 30, 2020
  • Latest release: Feb 9, 2021
  • Number of updates: 8
  • Update frequency: every 5.1 days
  • Top authors: fernandiez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /543 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Contenido RGPD
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0934.99 ▼5.82
Dashboard /wp-admin3.42 ▲0.0744.28 ▼15.42
Posts /wp-admin/edit.php3.53 ▲0.1746.38 ▲1.58
Add New Post /wp-admin/post-new.php6.00 ▲0.1180.86 ▼13.80
Media Library /wp-admin/upload.php3.34 ▲0.1135.30 ▲3.96

Server storage [IO: ▲0.29MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Contenido RGPD
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.23 ▼1.041.71 ▼0.3539.32 ▼4.24
Dashboard /wp-admin2,219 ▲285.90 ▼0.15110.83 ▲9.5342.61 ▼0.24
Posts /wp-admin/edit.php2,105 ▲162.06 ▲0.0542.25 ▲1.7536.31 ▲0.87
Add New Post /wp-admin/post-new.php1,559 ▲1723.14 ▲4.48652.95 ▲17.2754.02 ▼6.08
Media Library /wp-admin/upload.php1,404 ▲194.27 ▲0.0697.64 ▼28.8943.12 ▼0.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/contenido-rgpd/contenido-rgpd.php:272

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: legal, gdpr, rgpd

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

The main file in "Contenido RGPD" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected511 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP116148463
Markdown118033
SVG10015

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.24MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png219.72KB54.71KB▼ 75.10%
assets/banner-772x250.png4.12KB1.74KB▼ 57.72%
assets/icon-128x128.png1.19KB0.58KB▼ 51.68%
assets/banner-1544x500.png17.98KB8.44KB▼ 53.04%
assets/icon-256x256.png1.90KB0.88KB▼ 53.76%