90% samesite

Code Review | SameSite Cookies

WordPress plugin SameSite Cookies scored 90% from 54 tests.

About plugin

  • Plugin page: samesite
  • Plugin version: 2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3
  • WordPress version: 6.3.1
  • First release: May 2, 2019
  • Latest release: Jul 23, 2023
  • Number of updates: 18
  • Update frequency: every 85.7 days
  • Top authors: ayeshrajans (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 15,765 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.60ms] Passed 4 tests

Analyzing server-side resources used by SameSite Cookies
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.11 ▼2.90
Dashboard /wp-admin3.31 ▲0.0044.74 ▼0.57
Posts /wp-admin/edit.php3.36 ▲0.0044.53 ▼2.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.21 ▼12.07
Media Library /wp-admin/upload.php3.23 ▲0.0038.14 ▲5.40

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

SameSite Cookies: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.56 ▼1.191.76 ▼0.1744.40 ▼4.29
Dashboard /wp-admin2,206 ▲155.79 ▲0.68100.75 ▼1.6938.74 ▼6.12
Posts /wp-admin/edit.php2,092 ▼01.98 ▼0.0139.93 ▼0.3037.56 ▼0.28
Add New Post /wp-admin/post-new.php1,543 ▲1018.35 ▼5.05588.85 ▼26.7349.63 ▲1.20
Media Library /wp-admin/upload.php1,382 ▼94.17 ▼0.0696.20 ▼7.9541.17 ▼5.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: security, cookies, samesite, csrf

samesite/samesite.php 92% from 13 tests

The primary PHP file in "SameSite Cookies" version 2.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 196 characters long)

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
Everything looks great! No dangerous files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12211465
JSON10025

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin