Created at 2025-11-27 16:01:25 , with PHPMetrics v2.9.1 (Jean-François Lépine).
Violations
11
Information
1
Warnings
4
Errors
6
Criticals
0

Class Violations

Class Violations
Drupal\google_analytics\Form\GoogleAnalyticsAdminSettingsForm
Blob / God object error
A blob object (or "god class") does not follow the Single responsibility principle.

* object has lot of public methods (15, excluding getters and setters)
* object has a high Lack of cohesion of methods (LCOM=20)
* object knows everything (and use lot of external classes)

Maybe you should reducing the number of methods splitting this object in many sub objects.
Too complex class code error
This class looks really complex.

* Algorithms are complex (Total cyclomatic complexity of class is 110)
* Component uses 335 operators

Maybe you should delegate some code to other objects.
Too complex method code error
This class looks really complex.

* Algorithms are complex (Max cyclomatic complexity of class methods is 41)

Maybe you should delegate some code to other objects or split complex method.
Probably bugged warning
This component contains in theory 6.94 bugs.

* Calculation is based on number of operators, operands, cyclomatic complexity
* See more details at https://en.wikipedia.org/wiki/Halstead_complexity_measures
* testsuites has dependency to this class.

Maybe you should check your unit tests for this class.
Too long information
This class looks really long.

* Class has 418 logical lines of code
* Class has 760 lines of code

Maybe your class should not exceed 200 lines of logical code
Blob / God object Too complex class code Too complex method code Probably bugged Too long
Drupal\google_analytics\JavascriptLocalCache
Too complex method code error
This class looks really complex.

* Algorithms are complex (Max cyclomatic complexity of class methods is 18)

Maybe you should delegate some code to other objects or split complex method.
Too complex method code
Drupal\google_analytics\EventSubscriber\GoogleAnalyticsConfig\DefaultConfig
Too complex method code error
This class looks really complex.

* Algorithms are complex (Max cyclomatic complexity of class methods is 18)

Maybe you should delegate some code to other objects or split complex method.
Too complex method code
Drupal\google_analytics\EventSubscriber\GoogleAnalyticsConfig\CustomConfig
Too complex method code error
This class looks really complex.

* Algorithms are complex (Max cyclomatic complexity of class methods is 14)

Maybe you should delegate some code to other objects or split complex method.
Too complex method code

Package Violations

Package Violations
Drupal\google_analytics\Event
Stable Abstractions Principle warning
Packages should be either abstract and stable or concrete and instable.

This package is instable and abstract.
Stable Dependencies Principle warning
Packages should depend in the direction of stability.

This package is more stable (0.3) than 1 package(s) that it depends on.
The packages that are more stable are

* Drupal\google_analytics (0.769)
Stable Abstractions Principle Stable Dependencies Principle
Drupal\google_analytics\Helpers
Stable Dependencies Principle warning
Packages should depend in the direction of stability.

This package is more stable (0.75) than 1 package(s) that it depends on.
The packages that are more stable are

* Drupal\google_analytics (0.769)
Stable Dependencies Principle