84% jm-gdpr

Code Review | GDPR4EVERYONE

WordPress plugin GDPR4EVERYONE scored84%from 54 tests.

About plugin

  • Plugin page: jm-gdpr
  • Plugin version: 0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 16, 2018
  • Latest release: Jun 16, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jakubmudra123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /585 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.51ms] Passed 4 tests

An overview of server-side resources used by GDPR4EVERYONE
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.00 ▼2.43
Dashboard /wp-admin3.37 ▲0.0751.76 ▼1.85
Posts /wp-admin/edit.php3.48 ▲0.1347.88 ▼2.14
Add New Post /wp-admin/post-new.php5.95 ▲0.06102.06 ▲3.47
Media Library /wp-admin/upload.php3.29 ▲0.0634.03 ▼3.62

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-posts
jmgdpr_cookie_link_text
jmgdpr_cookie_ok_text
jmgdpr_privacy_checkbox_label
widget_theysaidso_widget
jmgdpr_cookie_message
jmgdpr_show_cookie_message
can_compress_scripts
db_upgraded
widget_recent-comments
...

Browser metrics Passed 4 tests

GDPR4EVERYONE: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11514.41 ▲0.137.16 ▲5.5555.92 ▲14.51
Dashboard /wp-admin2,207 ▲305.65 ▲0.0785.93 ▼8.4742.67 ▲0.02
Posts /wp-admin/edit.php2,112 ▲151.99 ▲0.0134.31 ▼2.3434.93 ▼1.90
Add New Post /wp-admin/post-new.php1,541 ▲1323.24 ▲0.15649.88 ▼32.2158.82 ▲4.54
Media Library /wp-admin/upload.php1,412 ▲154.21 ▲0.0297.02 ▼15.7142.91 ▼2.83

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
  • Zombie WordPress options detected upon uninstall: 13 options
    • widget_theysaidso_widget
    • jmgdpr_cookie_link_href
    • jmgdpr_show_cookie_message
    • jmgdpr_cookie_message
    • widget_recent-comments
    • jmgdpr_cookie_link_text
    • jmgdpr_show_privacy_checkbox
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jm-gdpr/jmGDPRAdmin.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: cookies, gdpr, security

jm-gdpr/jm-gdpr-plugin.php 92% from 13 tests

The main PHP script in "GDPR4EVERYONE" version 0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("jm-gdpr.php" instead of "jm-gdpr-plugin.php")

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
Good job! No executable or dangerous file extensions detected309 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP69629232
PO File1202070
CSS1006
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png97.03KB25.40KB▼ 73.82%