78% simple-gdpr

Code Review | Simple GDPR

WordPress plugin Simple GDPR scored78%from 54 tests.

About plugin

  • Plugin page: simple-gdpr
  • Plugin version: 1.51
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-6.3
  • WordPress version: 6.3.1
  • First release: May 3, 2018
  • Latest release: Aug 11, 2023
  • Number of updates: 33
  • Update frequency: every 58.3 days
  • Top authors: rhellewell@gmail.com (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.35ms] Passed 4 tests

A check of server-side resources used by Simple GDPR
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.46 ▲1.25
Dashboard /wp-admin3.39 ▲0.0948.29 ▼2.82
Posts /wp-admin/edit.php3.51 ▲0.1548.55 ▼6.57
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.75 ▼9.27
Media Library /wp-admin/upload.php3.32 ▲0.0938.15 ▲4.29
Simple GDPR /wp-admin/options-general.php?page=simple-gdpr3.2934.44

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple GDPR
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8814.42 ▲0.076.66 ▲4.9852.34 ▲8.06
Dashboard /wp-admin2,201 ▲275.63 ▲0.0592.12 ▼5.4639.33 ▼0.86
Posts /wp-admin/edit.php2,109 ▲71.97 ▲0.0341.06 ▲2.8833.30 ▼0.38
Add New Post /wp-admin/post-new.php1,531 ▲523.25 ▼0.41661.84 ▼15.6753.46 ▼1.04
Media Library /wp-admin/upload.php1,409 ▲94.21 ▼0.0195.07 ▼13.4340.84 ▼9.22
Simple GDPR /wp-admin/options-general.php?page=simple-gdpr1,1212.0029.2952.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=simple-gdpr
    • > Notice in wp-content/plugins/simple-gdpr/simple-gdpr.php+247
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/simple-gdpr/simple-gdpr.php:430

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

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: google analytics, privacy, gdpr

simple-gdpr/simple-gdpr.php 92% from 13 tests

"Simple GDPR" version 1.51's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 372 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin700 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP186153540
CSS3264159
JavaScript1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 3.04MB with 2.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1000x200.png606.38KB83.19KB▼ 86.28%
assets/icon-128x128.png220.81KB11.35KB▼ 94.86%
assets/banner-772x250.png747.41KB94.73KB▼ 87.33%
assets/curl-result.png4.43KB2.02KB▼ 54.31%
assets/icon-256x256.png574.18KB36.31KB▼ 93.68%