90% wp-cookie-law-info

Code Review | WP Cookie Law Info

WordPress plugin WP Cookie Law Info scored90%from 54 tests.

About plugin

  • Plugin page: wp-cookie-law-info
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 4, 2018
  • Latest release: Apr 4, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: anshuln90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /14,829 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.56ms] Passed 4 tests

Server-side resources used by WP Cookie Law Info
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.41 ▼5.23
Dashboard /wp-admin3.36 ▲0.0546.84 ▼2.06
Posts /wp-admin/edit.php3.41 ▲0.0548.80 ▲0.97
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.04 ▼7.93
Media Library /wp-admin/upload.php3.28 ▲0.0536.91 ▲1.85
WP Cookie Law Info /wp-admin/options-general.php?page=wp-cookie-law-settings3.2732.69

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Cookie Law Info
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲23314.23 ▼0.149.23 ▲7.2750.29 ▲4.63
Dashboard /wp-admin2,234 ▲465.06 ▼0.84106.78 ▼5.4540.55 ▼3.19
Posts /wp-admin/edit.php2,119 ▲332.28 ▲0.2937.60 ▲0.5535.28 ▲0.80
Add New Post /wp-admin/post-new.php1,534 ▲123.15 ▲0.01656.24 ▼16.5134.45 ▼19.63
Media Library /wp-admin/upload.php1,413 ▲254.58 ▲0.4199.03 ▼6.0542.09 ▼2.03
WP Cookie Law Info /wp-admin/options-general.php?page=wp-cookie-law-settings1,5032.7956.7674.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • wcl_settings
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (23 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-cookie-law-info/wp-cookie-law-info.php Passed 13 tests

Analyzing the main PHP file in "WP Cookie Law Info" version 1.0
51 characters long description:
A simple way to show EU Cookie Law in your website.

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 plugin497 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions9100.00%
▷ Anonymous functions00.00%
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin