68% surbma-gdpr-proof-google-analytics

Code Review | Surbma | GDPR Proof Cookie Consent & Notice Bar

WordPress plugin Surbma | GDPR Proof Cookie Consent & Notice Bar scored68%from 54 tests.

About plugin

  • Plugin page: surbma-gdpr-proof...
  • Plugin version: 17.8.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2018
  • Latest release: Jul 5, 2023
  • Number of updates: 106
  • Update frequency: every 18.2 days
  • Top authors: Surbma (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

900+ active /36,273 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.11MB] [CPU: ▲22.02ms] 75% from 4 tests

An overview of server-side resources used by Surbma | GDPR Proof Cookie Consent & Notice Bar
Please have a look at the following items
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.11MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.96 ▲5.5066.61 ▲26.25
Dashboard /wp-admin8.98 ▲5.6474.39 ▲15.10
Posts /wp-admin/edit.php8.98 ▲5.6283.70 ▲35.99
Add New Post /wp-admin/post-new.php9.57 ▲3.68105.83 ▲12.71
Media Library /wp-admin/upload.php8.98 ▲5.7570.04 ▲34.03
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9857.44

Server storage [IO: ▲5.71MB] [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: 436 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
surbma_gpga_fields
can_compress_scripts
theysaidso_admin_options
fs_debug_mode
widget_recent-posts
db_upgraded
fs_active_plugins
fs_accounts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Surbma | GDPR Proof Cookie Consent & Notice Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7614.72 ▲0.461.79 ▲0.2129.95 ▼10.62
Dashboard /wp-admin2,228 ▲485.48 ▼0.1883.19 ▼8.4043.04 ▲3.96
Posts /wp-admin/edit.php2,137 ▲342.02 ▼0.1139.80 ▼1.2537.24 ▼1.82
Add New Post /wp-admin/post-new.php1,544 ▲1823.03 ▼0.03593.39 ▼55.5454.68 ▲4.33
Media Library /wp-admin/upload.php1,436 ▲334.21 ▲0.0494.87 ▼3.4145.88 ▲2.36
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1011.6824.5628.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/surbma-gdpr-proof-google-analytics/vendors/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • fs_accounts
    • can_compress_scripts
    • widget_theysaidso_widget
    • fs_debug_mode
    • surbma_gpga_fields
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/surbma-gdpr-proof-google-analytics/surbma-gdpr-proof-google-analytics.php
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/surbma-gdpr-proof-google-analytics/lib/shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-gdpr-proof-google-analytics/lib/social.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-gdpr-proof-google-analytics/pages/settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-gdpr-proof-google-analytics/admin/surbma-admin.php:17
    • > PHP Warning
      include_once(SURBMA_GPGA_PLUGIN_DIR/pages/social.php): failed to open stream: No such file or directory in wp-content/plugins/surbma-gdpr-proof-google-analytics/lib/admin.php on line 5
    • > PHP Warning
      include_once(SURBMA_GPGA_PLUGIN_DIR/pages/settings.php): failed to open stream: No such file or directory in wp-content/plugins/surbma-gdpr-proof-google-analytics/lib/admin.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'SURBMA_GPGA_PLUGIN_DIR/pages/settings.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/surbma-gdpr-proof-google-analytics/lib/admin.php on line 4
    • > PHP Warning
      include_once(SURBMA_GPGA_PLUGIN_DIR/admin/surbma-admin.php): failed to open stream: No such file or directory in wp-content/plugins/surbma-gdpr-proof-google-analytics/lib/admin.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'SURBMA_GPGA_PLUGIN_DIR/pages/documentation.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/surbma-gdpr-proof-google-analytics/lib/admin.php on line 7
    • > PHP Warning
      include_once(SURBMA_GPGA_PLUGIN_DIR/pages/cookies.php): failed to open stream: No such file or directory in wp-content/plugins/surbma-gdpr-proof-google-analytics/lib/admin.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: cookie consent, google analytics, cookie, facebook pixel, gdpr...

surbma-gdpr-proof-google-analytics/surbma-gdpr-proof-google-analytics.php 92% from 13 tests

Analyzing the main PHP file in "Surbma | GDPR Proof Cookie Consent & Notice Bar" version 17.8.2
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin68,188 lines of code in 338 files:
LanguageFilesBlank linesComment linesLines of code
PHP1268,13317,23535,027
JavaScript264,68325611,748
CSS20383,0329,637
LESS1494,5995,0028,746
Markdown576001,936
JSON32201,072
XML10014
SVG8008

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity93.06
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes00.00%
Methods1,259
▷ Static methods19715.65%
▷ Public methods87069.10%
▷ Protected methods171.35%
▷ Private methods37229.55%
Functions129
▷ Named functions12697.67%
▷ Anonymous functions32.33%
Constants153
▷ Global constants10669.28%
▷ Class constants4730.72%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendors/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
vendors/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%