10% privacy-consent-assistant

Code Review | Privacy & Consent Assistant

WordPress plugin Privacy & Consent Assistant scored10%from 54 tests.

About plugin

  • Plugin page: privacy-consent-a...
  • Plugin version: 1.2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2018
  • Latest release: Oct 8, 2020
  • Number of updates: 57
  • Update frequency: every 24.7 days
  • Top authors: alexdemchak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,607 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/privacy-consent-assistant/trm-gdpr-assistant.php+205
    file_get_contents(wp-content/plugins/privacy-consent-assistant/css/dynamic.css): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.22MB] [CPU: ▲11.04ms] Passed 4 tests

A check of server-side resources used by Privacy & Consent Assistant
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2455.73 ▲12.66
Dashboard /wp-admin3.51 ▲0.2162.53 ▲11.40
Posts /wp-admin/edit.php3.61 ▲0.2563.11 ▲13.66
Add New Post /wp-admin/post-new.php6.12 ▲0.23100.93 ▲10.93
Media Library /wp-admin/upload.php3.44 ▲0.2147.78 ▲9.17
Add New /wp-admin/post-new.php?post_type=gdpr-policy3.5963.06
Policies /wp-admin/edit.php?post_type=gdpr-policy3.5460.86

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 13 new options
New WordPress options
db_upgraded
__trm_gdpr_version
widget_recent-comments
trm_gdpr_dynamic_style
trm_gdpr_default_notice_consent_bar
trm_gdpr_inserted_privacy_policy
can_compress_scripts
trm_gdpr_default_notice_form_consent
trm_gdpr_inserted_terms_of_service
widget_recent-posts
...

Browser metrics Passed 4 tests

Privacy & Consent Assistant: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14814.70 ▲0.442.98 ▲1.3456.24 ▲12.80
Dashboard /wp-admin2,240 ▲635.61 ▲0.0292.29 ▼0.9741.63 ▼0.91
Posts /wp-admin/edit.php2,142 ▲391.98 ▼0.0539.96 ▼4.2535.01 ▼5.15
Add New Post /wp-admin/post-new.php1,569 ▲2623.11 ▲0.02710.54 ▲80.3552.36 ▲2.85
Media Library /wp-admin/upload.php1,448 ▲454.19 ▲0.01105.70 ▲5.5647.30 ▼0.55
Add New /wp-admin/post-new.php?post_type=gdpr-policy2,2897.63183.5963.82
Policies /wp-admin/edit.php?post_type=gdpr-policy1,9471.9733.8134.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • trm_gdpr_inserted_terms_of_service
    • trm_gdpr_dynamic_style
    • __trm_gdpr_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • trm_gdpr_inserted_privacy_policy
    • widget_recent-comments
    • trm_gdpr_default_notice_consent_bar
    • can_compress_scripts
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: third river marketing

privacy-consent-assistant/trm-gdpr-assistant.php 77% from 13 tests

The principal PHP file in "Privacy & Consent Assistant" v. 1.2.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 169 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("privacy-consent-assistant.php" instead of "trm-gdpr-assistant.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,340 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP211879690
CSS46317383
JavaScript75726267

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity100.00
▷ Minimum class complexity100.00
▷ Maximum class complexity100.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods13.33%
▷ Public methods2996.67%
▷ Protected methods00.00%
▷ Private methods13.33%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants0
▷ Global constants00.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
No PNG files were detected