78% webme-cookie-privacy

Code Review | WebMe Cookie & Privacy

WordPress plugin WebMe Cookie & Privacy scored78%from 54 tests.

About plugin

  • Plugin page: webme-cookie-privacy
  • Plugin version: 2.0.15
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 16, 2020
  • Latest release: Oct 2, 2023
  • Number of updates: 33
  • Update frequency: every 39.6 days
  • Top authors: webmeit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /5,544 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.38MB] [CPU: ▼5.92ms] Passed 4 tests

Server-side resources used by WebMe Cookie & Privacy
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4342.99 ▲6.10
Dashboard /wp-admin3.73 ▲0.3846.98 ▼11.36
Posts /wp-admin/edit.php3.78 ▲0.4250.03 ▼0.34
Add New Post /wp-admin/post-new.php6.26 ▲0.3790.25 ▼18.06
Media Library /wp-admin/upload.php3.58 ▲0.3537.03 ▲6.64
Cookie & Privacy /wp-admin/admin.php?page=webme-cookie-privacy3.63329.40

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
webme-cookie-privacy
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

WebMe Cookie & Privacy: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲7713.42 ▼0.871.66 ▼0.6744.16 ▲3.08
Dashboard /wp-admin2,243 ▲525.07 ▲0.22101.84 ▲0.2538.22 ▼4.48
Posts /wp-admin/edit.php2,110 ▲212.34 ▲0.2834.93 ▼6.0733.63 ▼2.70
Add New Post /wp-admin/post-new.php1,718 ▲17924.60 ▲1.50589.40 ▼12.3234.77 ▼29.58
Media Library /wp-admin/upload.php1,432 ▲444.37 ▲0.1789.25 ▼5.6041.92 ▼0.72
Cookie & Privacy /wp-admin/admin.php?page=webme-cookie-privacy1,1412.2453.7241.60

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • webme-cookie-privacy
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/webme-cookie-privacy/includes/iubenda-cookie-class/test.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/webme-cookie-privacy/public/partials/wm-gdpr-public-display.php:53
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/webme-cookie-privacy/admin/partials/wm-gdpr-admin-display.php:3
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/webme-cookie-privacy/includes/iubenda-cookie-class/test.php on line 58

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: iubenda, gdpr, cookie law info, privacy

webme-cookie-privacy/wm-gdpr.php 85% from 13 tests

This is the main PHP file of "WebMe Cookie & Privacy" version 2.0.15, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("webme-cookie-privacy.php" instead of "wm-gdpr.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin4,629 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP229371,5394,280
Markdown2760205
PO File1417072
CSS111447
JSON10016
JavaScript2209

PHP code Passed 2 tests

This is a short overview 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.46
Average class complexity51.53
▷ Minimum class complexity1.00
▷ Maximum class complexity246.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods203
▷ Static methods104.93%
▷ Public methods17787.19%
▷ Protected methods157.39%
▷ Private methods115.42%
Functions13
▷ Named functions969.23%
▷ Anonymous functions430.77%
Constants31
▷ Global constants2374.19%
▷ Class constants825.81%
▷ Public constants8100.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
There are no PNG files in this plugin