84% url-param-to-cookie

Code Review | URL Param To Cookie

WordPress plugin URL Param To Cookie scored84%from 54 tests.

About plugin

  • Plugin page: url-param-to-cookie
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Oct 24, 2019
  • Latest release: Oct 24, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: shaheedabdol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.91ms] Passed 4 tests

An overview of server-side resources used by URL Param To Cookie
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.81 ▲0.68
Dashboard /wp-admin3.34 ▲0.0448.54 ▼6.40
Posts /wp-admin/edit.php3.39 ▲0.0453.12 ▼0.68
Add New Post /wp-admin/post-new.php5.92 ▲0.0499.35 ▲5.45
Media Library /wp-admin/upload.php3.26 ▲0.0439.88 ▲2.75
UrlParamToCookie Settings /wp-admin/options-general.php?page=my-setting-admin3.2332.82

Server storage [IO: ▲0.01MB] [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: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

URL Param To Cookie: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.44 ▲0.091.92 ▲0.3545.91 ▲4.93
Dashboard /wp-admin2,199 ▲225.60 ▼0.0689.44 ▼0.8244.27 ▲8.09
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0239.95 ▲2.1235.89 ▲0.54
Add New Post /wp-admin/post-new.php1,529 ▲123.04 ▼0.15653.41 ▼35.7667.41 ▲15.72
Media Library /wp-admin/upload.php1,404 ▲44.10 ▼0.03109.48 ▼13.1146.40 ▼3.01
UrlParamToCookie Settings /wp-admin/options-general.php?page=my-setting-admin8582.0230.2627.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 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/url-param-to-cookie/url-param-to-cookie.php:159

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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: url param, param, url, cookie

url-param-to-cookie/url-param-to-cookie.php Passed 13 tests

The entry point to "URL Param To Cookie" version 1.0 is a PHP file that has certain tags in its header comment area
55 characters long description:
Reads specified param from url and stores it in cookie.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected139 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1128139

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity9.00
▷ Minimum class complexity4.00
▷ Maximum class complexity14.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin