72% root-cookie

Code Review | root Cookie

WordPress plugin root Cookie scored72%from 54 tests.

About plugin

  • Plugin page: root-cookie
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.3
  • WordPress version: 6.3.1
  • First release: Mar 22, 2007
  • Latest release: Dec 23, 2011
  • Number of updates: 36
  • Update frequency: every 50.3 days
  • Top authors: linickx (97.22%)sc0ttkclark (5.56%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /13,396 total downloads

Benchmarks

Plugin footprint 83% from 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.17MB] [CPU: ▼14.18ms] Passed 4 tests

Server-side resources used by root Cookie
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.11 ▼6.80
Dashboard /wp-admin3.19 ▼0.1234.68 ▼10.30
Posts /wp-admin/edit.php3.25 ▼0.1034.16 ▼21.20
Add New Post /wp-admin/post-new.php5.44 ▼0.4476.97 ▼18.41
Media Library /wp-admin/upload.php3.20 ▼0.0331.93 ▼2.25
root Cookie /wp-admin/options-general.php?page=root-cookie3.1629.01

Server storage [IO: ▲0.15MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
rootcookie_subdomain
can_compress_scripts

Browser metrics Passed 4 tests

root Cookie: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.431.64 ▼0.4341.23 ▼6.25
Dashboard /wp-admin2,210 ▲215.87 ▲0.94106.18 ▼23.0042.30 ▲0.28
Posts /wp-admin/edit.php2,093 ▲12.05 ▼0.0141.06 ▼3.4234.05 ▼3.41
Add New Post /wp-admin/post-new.php1,517 ▼2017.78 ▼5.29625.47 ▼17.3266.55 ▲4.57
Media Library /wp-admin/upload.php1,395 ▲104.24 ▲0.04100.49 ▼1.4245.74 ▲3.23
root Cookie /wp-admin/options-general.php?page=root-cookie9542.1429.0836.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • rootcookie_subdomain
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=root-cookie
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/options-general.php?page=root-cookie
    • > Notice in wp-content/plugins/root-cookie/root-cookie.php+236
    Undefined index: rootcookie_submit_hidden

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/root-cookie/admin-options-help.inc.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/root-cookie/root-cookie.php:349

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (The Admin interface, optional for if you want to change the domain.) image required
  • Plugin Name: Please specify the plugin name on the first line ( === root-cookie === )
The official readme.txt might help

root-cookie/root-cookie.php Passed 13 tests

The main PHP file in "root Cookie" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
128 characters long description:
Changes the cookie default path to / (i.e. the whole domain.com not just domain.com/blog) with an option to go across subdomains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin255 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26151255

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png124.15KB31.13KB▼ 74.92%
donate.png10.26KB4.27KB▼ 58.36%