93% cookie-params

Code Review | Cookie Params

WordPress plugin Cookie Params scored 93% from 54 tests.

About plugin

  • Plugin page: cookie-params
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.0.1
  • WordPress version: 5.8.1
  • First release: Dec 17, 2014
  • Latest release: Jan 12, 2015
  • Number of updates: 11
  • Update frequency: every 2.4 days
  • Top authors: hypedtext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 996 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼145.47ms] Passed 4 tests

Server-side resources used by Cookie Params
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1436.15 ▲16.34
Dashboard /wp-admin3.09 ▲0.0344.30 ▼1.84
Posts /wp-admin/edit.php3.14 ▲0.0340.97 ▼1.98
Add New Post /wp-admin/post-new.php5.45 ▲0.0184.35 ▼579.11
Media Library /wp-admin/upload.php3.03 ▲0.0233.52 ▲1.07
Cookie Params /wp-admin/options-general.php?page=cookie-params/Cookie_Params.php3.0029.01

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Cookie Params
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,711 ▲11515.78 ▲0.2312.11 ▲1.2149.05 ▼1.27
Dashboard /wp-admin2,975 ▲445.92 ▼0.16130.93 ▼27.53105.11 ▼10.66
Posts /wp-admin/edit.php2,744 ▲52.71 ▲0.0163.01 ▼3.30100.42 ▲11.26
Add New Post /wp-admin/post-new.php1,694 ▲19618.88 ▲0.05388.77 ▼22.35111.41 ▼2.28
Media Library /wp-admin/upload.php1,812 ▲85.04 ▼0.00160.63 ▲22.30121.69 ▲8.09
Cookie Params /wp-admin/options-general.php?page=cookie-params/Cookie_Params.php1,1532.1056.2579.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cookie-params/Cookie_Params.php:17

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

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Settings...) image required
Please take inspiration from this readme.txt

cookie-params/Cookie_Params.php 85% from 13 tests

The main PHP file in "Cookie Params" ver. 0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cookie-params.php" instead of "Cookie_Params.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin141 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png48.07KB12.98KB▼ 73.00%