10% multimediamonster-cookie-law-authorization

Code Review | Cookie Law Authorization

WordPress plugin Cookie Law Authorization scored10%from 54 tests.

About plugin

  • Plugin page: multimediamonster...
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.1
  • WordPress version: 6.3.1
  • First release: Dec 5, 2014
  • Latest release: May 2, 2016
  • Number of updates: 70
  • Update frequency: every 7.4 days
  • Top authors: mmmrenske (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,035 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/multimediamonster-cookie-law-authorization/classes/class-mmm-cla-settings.php+738
    syntax error, unexpected end of file, expecting function (T_FUNCTION) or const (T_CONST)

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.33ms] Passed 4 tests

Analyzing server-side resources used by Cookie Law Authorization
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.06 ▼8.94
Dashboard /wp-admin3.31 ▼0.0451.17 ▼11.21
Posts /wp-admin/edit.php3.36 ▲0.0047.82 ▲0.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.06 ▼9.72
Media Library /wp-admin/upload.php3.23 ▲0.0035.18 ▲2.35

Server storage [IO: ▲0.44MB] [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: 281 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Cookie Law Authorization: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.48 ▲0.112.02 ▲0.2544.72 ▲1.75
Dashboard /wp-admin2,203 ▲275.76 ▼0.14100.92 ▼14.8941.40 ▼4.38
Posts /wp-admin/edit.php2,089 ▲32.03 ▼0.0540.23 ▲3.7534.42 ▲0.30
Add New Post /wp-admin/post-new.php1,514 ▼517.64 ▼5.92651.43 ▲7.6550.70 ▼0.53
Media Library /wp-admin/upload.php1,385 ▼34.17 ▼0.0599.81 ▼2.3544.40 ▼1.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected end of file, expecting function (T_FUNCTION) or const (T_CONST) in wp-content/plugins/multimediamonster-cookie-law-authorization/classes/class-mmm-cla-frontend-widget.php on line 132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/multimediamonster-cookie-law-authorization/multimediamonster-cookie-law-authorization.php:28
    • > PHP Parse error
      syntax error, unexpected end of file, expecting function (T_FUNCTION) or const (T_CONST) in wp-content/plugins/multimediamonster-cookie-law-authorization/classes/class-mmm-cla-settings.php on line 738
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/multimediamonster-cookie-law-authorization/classes/class-mmm-cla-admin-pages.php on line 101

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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: cookie law, cookie levels, cookies

multimediamonster-cookie-law-authorization/multimediamonster-cookie-law-authorization.php 92% from 13 tests

The main PHP script in "Cookie Law Authorization" version 1.4.4 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 169 characters long)

Code Analysis Passed 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 plugin3,156 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP121462411,886
JavaScript42339509
CSS3962491
PO File1118276265
XML1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity15.55
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods51
▷ Static methods51100.00%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/frontend/cookie-tool.png5.52KB2.46KB▼ 55.46%
images/frontend/cookie-tool-do.png1.20KB0.45KB▼ 62.48%
images/admin/copyright-bg.png18.33KB6.75KB▼ 63.16%
images/admin/medium-icon.png6.50KB2.20KB▼ 66.20%
images/admin/googlemaps-icon.png2.02KB1.15KB▼ 42.84%