78% privacy-policy-message

Code Review | Privacy Policy Message

WordPress plugin Privacy Policy Message scored78%from 54 tests.

About plugin

  • Plugin page: privacy-policy-me...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2019
  • Latest release: Apr 23, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: kamilnowak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /586 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.59ms] Passed 4 tests

An overview of server-side resources used by Privacy Policy Message
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.35 ▼3.43
Dashboard /wp-admin3.33 ▲0.0349.38 ▼5.68
Posts /wp-admin/edit.php3.38 ▲0.0252.37 ▼1.77
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.87 ▼11.49
Media Library /wp-admin/upload.php3.25 ▲0.0240.65 ▲2.66
Privacy Policy Message /wp-admin/options-general.php?page=prvpmsg3.2028.21

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
prvpmsg_options

Browser metrics Passed 4 tests

An overview of browser requirements for Privacy Policy Message
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18513.43 ▼0.8410.46 ▲8.8548.18 ▲5.96
Dashboard /wp-admin2,205 ▲285.65 ▼0.0093.47 ▲1.7040.13 ▼1.75
Posts /wp-admin/edit.php2,110 ▲102.00 ▲0.0037.28 ▲0.9535.88 ▼2.32
Add New Post /wp-admin/post-new.php1,536 ▲123.23 ▲4.78670.63 ▲12.8759.56 ▼2.09
Media Library /wp-admin/upload.php1,407 ▲44.19 ▼0.01100.28 ▼27.4847.08 ▼1.53
Privacy Policy Message /wp-admin/options-general.php?page=prvpmsg9112.1628.8628.64

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 does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • prvpmsg_options
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=prvpmsg
    • > Notice in wp-content/plugins/privacy-policy-message/class.privacypolicymessage-admin.php+172
    Undefined index: prvpmsg_field_message
    • > GET request to /wp-admin/options-general.php?page=prvpmsg
    • > Notice in wp-content/plugins/privacy-policy-message/class.privacypolicymessage-admin.php+183
    Undefined index: prvpmsg_field_link_label
    • > GET request to /wp-admin/options-general.php?page=prvpmsg
    • > Notice in wp-content/plugins/privacy-policy-message/class.privacypolicymessage-admin.php+129
    Undefined index: prvpmsg_field_custom_link_uri
    • > GET request to /wp-admin/options-general.php?page=prvpmsg
    • > Notice in wp-content/plugins/privacy-policy-message/class.privacypolicymessage-admin.php+177
    Undefined index: prvpmsg_field_button_label
    • > GET request to /wp-admin/options-general.php?page=prvpmsg
    • > Notice in wp-content/plugins/privacy-policy-message/class.privacypolicymessage-admin.php+134
    Undefined index: prvpmsg_field_cookie_expire_days

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/privacy-policy-message/privacy-policy-message.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: eu cookie, privacy, message, cookie, policy

privacy-policy-message/privacy-policy-message.php 92% from 13 tests

The entry point to "Privacy Policy Message" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin788 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
Sass32731326
PHP45063193
CSS359109
JavaScript2232694
PO File1252566

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin