84% instant-cookie-expire

Code Review | Instant Cookie Expire

WordPress plugin Instant Cookie Expire scored84%from 54 tests.

About plugin

  • Plugin page: instant-cookie-ex...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-4.7.1
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Oct 4, 2016
  • Number of updates: 19
  • Update frequency: every 10.5 days
  • Top authors: brechtryckaert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,212 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.00MB] [CPU: ▼10.84ms] Passed 4 tests

This is a short check of server-side resources used by Instant Cookie Expire
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.96 ▼3.51
Dashboard /wp-admin3.31 ▲0.0053.06 ▼6.92
Posts /wp-admin/edit.php3.36 ▲0.0048.24 ▼6.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.65 ▼25.95
Media Library /wp-admin/upload.php3.23 ▲0.0037.45 ▲1.91

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Instant Cookie Expire
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▲0.071.86 ▲0.1042.91 ▼0.41
Dashboard /wp-admin2,192 ▲155.54 ▼0.1382.89 ▼8.1742.99 ▲0.09
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0134.01 ▼2.9936.67 ▲1.60
Add New Post /wp-admin/post-new.php1,526 ▼223.25 ▼0.04668.57 ▼15.9752.97 ▼2.16
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.05100.00 ▼11.4747.87 ▲2.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/instant-cookie-expire/wp-instant-cookie-expire.php:25

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: post, cookie, pass, session, protected...

instant-cookie-expire/wp-instant-cookie-expire.php 92% from 13 tests

"Instant Cookie Expire" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("instant-cookie-expire.php" instead of "wp-instant-cookie-expire.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11222

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin