84% luckywp-cookie-notice-gdpr

Code Review | LuckyWP Cookie Notice (GDPR)

WordPress plugin LuckyWP Cookie Notice (GDPR) scored84%from 54 tests.

About plugin

  • Plugin page: luckywp-cookie-no...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Sep 28, 2018
  • Latest release: Aug 15, 2020
  • Number of updates: 10
  • Update frequency: every 68.7 days
  • Top authors: theluckywp (100%)

Code review

54 tests

User reviews

46 reviews

Install metrics

5,000+ active /18,033 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.16MB] [CPU: ▼6.54ms] Passed 4 tests

A check of server-side resources used by LuckyWP Cookie Notice (GDPR)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3640.10 ▲3.79
Dashboard /wp-admin3.51 ▲0.1644.03 ▼13.65
Posts /wp-admin/edit.php3.56 ▲0.2042.93 ▼6.08
Add New Post /wp-admin/post-new.php6.02 ▲0.1487.35 ▼8.58
Media Library /wp-admin/upload.php3.37 ▲0.1434.86 ▲2.14
Cookie Notice (GDPR) /wp-admin/options-general.php?page=lwpcng_settings3.3832.47

Server storage [IO: ▲0.13MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 10 new options
New WordPress options
lwpcng_appearance
widget_recent-comments
db_upgraded
lwpcng_general
lwpcng_advanced
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
lwpcng_rate_time
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for LuckyWP Cookie Notice (GDPR)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲20313.55 ▼1.077.16 ▲5.4054.27 ▲16.12
Dashboard /wp-admin2,210 ▲225.77 ▼0.1498.41 ▼18.2339.52 ▼3.15
Posts /wp-admin/edit.php2,090 ▲11.99 ▲0.0340.55 ▲0.9936.05 ▼0.03
Add New Post /wp-admin/post-new.php1,539 ▲1123.42 ▲5.27588.08 ▼21.1851.83 ▲0.94
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.0392.36 ▼4.6440.78 ▼1.39
Cookie Notice (GDPR) /wp-admin/options-general.php?page=lwpcng_settings9571.7227.6731.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 41× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: margin in wp-content/plugins/luckywp-cookie-notice-gdpr/front/widgets/notice/views/widget.php on line 33
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\cookieNoticeGdpr\\core\\helpers\\Html' not found in wp-content/plugins/luckywp-cookie-notice-gdpr/front/widgets/showAgain/views/widget.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\cookieNoticeGdpr\\core\\front\\BaseFront' not found in wp-content/plugins/luckywp-cookie-notice-gdpr/front/Front.php:15
    • > PHP Notice
      Undefined variable: position in wp-content/plugins/luckywp-cookie-notice-gdpr/front/widgets/notice/views/widget.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\cookieNoticeGdpr\\admin\\Rate' not found in wp-content/plugins/luckywp-cookie-notice-gdpr/admin/views/settings/index.php:8
    • > PHP Notice
      Undefined variable: show in wp-content/plugins/luckywp-cookie-notice-gdpr/front/widgets/notice/views/widget.php on line 28
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\cookieNoticeGdpr\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-cookie-notice-gdpr/core/front/BaseFront.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function display() on null in wp-content/plugins/luckywp-cookie-notice-gdpr/admin/views/settings/plugins.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'luckywp\\cookieNoticeGdpr\\core\\base\\BaseObject' not found in wp-content/plugins/luckywp-cookie-notice-gdpr/core/base/View.php:5
    • > PHP Notice
      Undefined variable: marginSide in wp-content/plugins/luckywp-cookie-notice-gdpr/front/widgets/showAgain/views/widget.php on line 27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: eu cookie law, cookie, notice, cookie law, gdpr

luckywp-cookie-notice-gdpr/luckywp-cookie-notice-gdpr.php Passed 13 tests

The entry point to "LuckyWP Cookie Notice (GDPR)" version 1.2 is a PHP file that has certain tags in its header comment area
112 characters long description:
The plugin allows you to notify visitors about the use of cookies (necessary to comply with the GDPR in the EU).

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
Everything looks great! No dangerous files found in this plugin2,358 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP394136312,352
CSS3003
JavaScript3003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity10.41
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces13
Interfaces1
Traits0
Classes28
▷ Abstract classes414.29%
▷ Concrete classes2485.71%
▷ Final classes00.00%
Methods141
▷ Static methods3726.24%
▷ Public methods13192.91%
▷ Protected methods85.67%
▷ Private methods21.42%
Functions10
▷ Named functions220.00%
▷ Anonymous functions880.00%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected