89% pieeye-gdpr-cpra-cookie-consent-dsr

Code Review | Pieeye: GDPR+CPRA+Cookie Consent+DSR

WordPress plugin Pieeye: GDPR+CPRA+Cookie Consent+DSR scored89%from 54 tests.

About plugin

  • Plugin page: pieeye-gdpr-cpra-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 6, 2023
  • Latest release: Oct 6, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: pieeye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /22 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Pieeye: GDPR+CPRA+Cookie Consent+DSR
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.59 ▼10.06
Dashboard /wp-admin3.34 ▲0.0445.69 ▼3.51
Posts /wp-admin/edit.php3.39 ▲0.0350.20 ▼1.00
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.37 ▼6.22
Media Library /wp-admin/upload.php3.26 ▲0.0333.61 ▼0.25

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pieeye: GDPR+CPRA+Cookie Consent+DSR
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲4513.37 ▼1.211.72 ▼0.2839.49 ▼6.61
Dashboard /wp-admin2,222 ▲345.85 ▼0.0199.28 ▼16.6940.54 ▼5.51
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0139.38 ▲0.8935.00 ▼4.86
Add New Post /wp-admin/post-new.php1,546 ▲2723.22 ▼0.23651.42 ▲3.9752.99 ▲4.12
Media Library /wp-admin/upload.php1,401 ▲134.20 ▼0.0194.45 ▼2.8541.95 ▼0.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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 no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: cookies, dsr, cookie banner, privacy compliance, cookie policy...

pieeye-gdpr-cpra-cookie-consent-dsr/index.php 85% from 13 tests

The main PHP file in "Pieeye: GDPR+CPRA+Cookie Consent+DSR" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 897 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("pieeye-gdpr-cpra-cookie-consent-dsr.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected670 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP23928387
CSS1494252
JavaScript24227
SVG4004

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin