89% gdpr-settings-for-wc

Code Review | GDPR Settings for WooCommerce

WordPress plugin GDPR Settings for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: gdpr-settings-for-wc
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2020
  • Latest release: Aug 2, 2021
  • Number of updates: 14
  • Update frequency: every 30.4 days
  • Top authors: salonsoweb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /2,448 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.69ms] Passed 4 tests

Analyzing server-side resources used by GDPR Settings for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.42 ▲1.20
Dashboard /wp-admin3.34 ▲0.0445.26 ▼2.61
Posts /wp-admin/edit.php3.39 ▲0.0447.66 ▲4.48
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.14 ▼9.08
Media Library /wp-admin/upload.php3.26 ▲0.0434.84 ▼0.26

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GDPR Settings for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4513.92 ▼0.201.80 ▲0.0842.47 ▲3.37
Dashboard /wp-admin2,198 ▲215.62 ▼0.0487.15 ▼1.8940.05 ▼5.74
Posts /wp-admin/edit.php2,100 ▲212.04 ▲0.0134.32 ▼0.1330.61 ▼0.50
Add New Post /wp-admin/post-new.php1,526 ▼1122.83 ▲4.75584.36 ▼97.5782.93 ▲15.12
Media Library /wp-admin/upload.php1,397 ▼64.23 ▲0.0299.57 ▲4.2541.94 ▼1.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

gdpr-settings-for-wc/wc-gdpr-settings.php 77% from 13 tests

"GDPR Settings for WooCommerce" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gdpr-settings-for-wc.php" instead of "wc-gdpr-settings.php")

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
There were no executable files found in this plugin198 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP64285126
PO File1151670
CSS1002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/by-tecnicorgpd-wp.png60.79KB17.69KB▼ 70.90%