84% klaro-consent-manager

Code Review | Klaro Consent Manager

WordPress plugin Klaro Consent Manager scored84%from 54 tests.

About plugin

  • Plugin page: klaro-consent-man...
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.2
  • WordPress version: 6.3.1
  • First release: Nov 12, 2018
  • Latest release: May 11, 2019
  • Number of updates: 32
  • Update frequency: every 5.7 days
  • Top authors: damiroquai (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /3,102 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.24MB] [CPU: ▼7.44ms] Passed 4 tests

An overview of server-side resources used by Klaro Consent Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2037.77 ▲0.63
Dashboard /wp-admin3.55 ▲0.2544.89 ▼0.80
Posts /wp-admin/edit.php3.66 ▲0.3144.55 ▼5.33
Add New Post /wp-admin/post-new.php6.16 ▲0.2779.96 ▼24.24
Media Library /wp-admin/upload.php3.47 ▲0.2536.78 ▲1.90
Settings /wp-admin/edit.php?post_type=klaro_consent&page=klaro-settings3.4532.25
Applications /wp-admin/edit.php?post_type=klaro_consent3.5135.96
Add New /wp-admin/post-new.php?post_type=klaro_consent3.5144.43

Server storage [IO: ▲0.24MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
klaro_option_name
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Klaro Consent Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲21414.54 ▲0.1811.78 ▲10.0840.90 ▼0.21
Dashboard /wp-admin2,260 ▲725.04 ▼0.83108.68 ▲3.6339.94 ▼11.27
Posts /wp-admin/edit.php2,145 ▲562.37 ▲0.3139.80 ▼0.3630.84 ▼4.78
Add New Post /wp-admin/post-new.php1,558 ▲2517.79 ▼5.34667.44 ▲68.7537.55 ▼5.60
Media Library /wp-admin/upload.php1,445 ▲634.45 ▲0.27100.65 ▲4.6442.37 ▲1.58
Settings /wp-admin/edit.php?post_type=klaro_consent&page=klaro-settings1,6343.0770.2928.33
Applications /wp-admin/edit.php?post_type=klaro_consent1,1092.2735.2126.45
Add New /wp-admin/post-new.php?post_type=klaro_consent1,9343.2265.7747.20

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/klaro-consent-manager/klaro.php

User-side errors Passed 1 test

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

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
5 plugin tags: gdpr, cookie, eu law, cookies, consent

klaro-consent-manager/klaro.php 92% from 13 tests

Analyzing the main PHP file in "Klaro Consent Manager" version 1.1.7
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("klaro-consent-manager.php" instead of "klaro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,869 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript514012,497
PHP3391124969
PO File2173186391
CSS10012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity41.33
▷ Minimum class complexity29.00
▷ Maximum class complexity54.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin