90% easy-cookie-law

Code Review | Easy Cookie Law

WordPress plugin Easy Cookie Law scored90%from 54 tests.

About plugin

  • Plugin page: easy-cookie-law
  • Plugin version: 3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Mar 20, 2015
  • Latest release: May 10, 2020
  • Number of updates: 28
  • Update frequency: every 67.1 days
  • Top authors: antsanchez (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

4,000+ active /24,837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲1.06ms] Passed 4 tests

Analyzing server-side resources used by Easy Cookie Law
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.74 ▼0.86
Dashboard /wp-admin3.32 ▲0.0146.98 ▼2.31
Posts /wp-admin/edit.php3.37 ▲0.0149.56 ▲3.72
Add New Post /wp-admin/post-new.php5.90 ▲0.01100.64 ▲5.57
Media Library /wp-admin/upload.php3.24 ▲0.0136.10 ▲3.68
Easy Cookie Law /wp-admin/options-general.php?page=ecl_menu3.2231.84

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Easy Cookie Law: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲3613.32 ▼1.092.54 ▲0.4543.12 ▼9.57
Dashboard /wp-admin2,210 ▲195.85 ▲0.94108.10 ▲3.3340.30 ▼1.96
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0038.41 ▲0.3835.88 ▲0.53
Add New Post /wp-admin/post-new.php1,537 ▲2322.74 ▲5.23640.20 ▼52.1453.59 ▲0.83
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.00101.75 ▲1.1642.42 ▼4.39
Easy Cookie Law /wp-admin/options-general.php?page=ecl_menu1,1142.0422.8948.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Easy Cookie Law Options Menu) image missing
Please take inspiration from this readme.txt

easy-cookie-law/easy-cookie-law.php Passed 13 tests

Analyzing the main PHP file in "Easy Cookie Law" version 3.1
56 characters long description:
Minimal code to help your website respect the cookie law

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected831 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP376132595
PO File14647167
CSS110059
JavaScript12010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1062.50%
▷ Protected methods00.00%
▷ Private methods637.50%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
There are no PNG files in this plugin