78% usercentrics-consent-management-platform

Code Review | USERCENTRICS CMP

WordPress plugin USERCENTRICS CMP scored 78% from 54 tests.

About plugin

  • Plugin page: usercentrics-cons...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 22, 2020
  • Latest release: Aug 5, 2021
  • Number of updates: 18
  • Update frequency: every 26.1 days
  • Top authors: darius1983 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 12,476 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.60ms] Passed 4 tests

This is a short check of server-side resources used by USERCENTRICS CMP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.23 ▼4.44
Dashboard /wp-admin3.34 ▲0.0344.52 ▼9.89
Posts /wp-admin/edit.php3.39 ▲0.0347.98 ▲1.95
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.81 ▼2.00
Media Library /wp-admin/upload.php3.26 ▲0.0336.81 ▲3.79

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

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

Browser metrics Passed 4 tests

Checking browser requirements for USERCENTRICS CMP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲12713.28 ▼1.111.85 ▲0.0740.18 ▼11.52
Dashboard /wp-admin2,240 ▲495.84 ▲0.94106.22 ▲0.7335.55 ▼3.92
Posts /wp-admin/edit.php2,126 ▲372.06 ▲0.0440.06 ▲6.2435.19 ▲1.95
Add New Post /wp-admin/post-new.php1,524 ▼917.59 ▼5.51641.12 ▼46.5157.75 ▲0.95
Media Library /wp-admin/upload.php1,425 ▲404.25 ▲0.0594.81 ▼20.9641.10 ▼11.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/usercentrics-consent-management-platform/public/partials/usercentrics-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'UC_Shortcode' not found in wp-content/plugins/usercentrics-consent-management-platform/public/shortcodes/class-uc-embed.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/usercentrics-consent-management-platform/admin/partials/usercentrics-admin-display.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/usercentrics-consent-management-platform/public/partials/shortcodes/uc-embed.php:7

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 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: dsgvo, cmp, usercentrics, consent management platform, google tag manager...

usercentrics-consent-management-platform/usercentrics.php 85% from 13 tests

The main PHP script in "USERCENTRICS CMP" version 1.0.9 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("usercentrics-consent-management-platform.php" instead of "usercentrics.php")
  • Text Domain: The text domain must be the same as the plugin slug, although 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
Everything looks great! No dangerous files found in this plugin688 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15202679439
CSS1150129
PO File12326106
JavaScript222714

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.56
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods3988.64%
▷ Protected methods00.00%
▷ Private methods511.36%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin