78% cookie-wise

Code Review | Cookie Wise

WordPress plugin Cookie Wise scored 78% from 54 tests.

About plugin

  • Plugin page: cookie-wise
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.0
  • WordPress version: 6.3.1
  • First release: Nov 14, 2012
  • Latest release: Oct 14, 2014
  • Number of updates: 15
  • Update frequency: every 46.6 days
  • Top authors: jeroensmeets (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 3,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Cookie Wise
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.89 ▼6.97
Dashboard /wp-admin3.33 ▲0.0344.20 ▼5.88
Posts /wp-admin/edit.php3.44 ▲0.0946.83 ▼2.44
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.58 ▼12.27
Media Library /wp-admin/upload.php3.25 ▲0.0337.63 ▲4.16

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Cookie Wise
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.24 ▼1.141.51 ▼0.4036.75 ▼10.04
Dashboard /wp-admin2,210 ▲224.86 ▼0.16110.49 ▼5.2938.96 ▼13.35
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0141.25 ▲4.1834.93 ▲0.63
Add New Post /wp-admin/post-new.php1,536 ▲323.56 ▲0.54652.24 ▲61.8353.87 ▼8.51
Media Library /wp-admin/upload.php1,392 ▲44.17 ▲0.01109.27 ▲9.8345.97 ▲0.54
Cookie Wise /wp-admin/cookiewise.php260.440.1114.72

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cookie-wise/cookiewise.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/cookiewise.php
    • > Network (severe)
    wp-admin/cookiewise.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === cookie-wise === )
The official readme.txt might help

cookie-wise/cookiewise.php 92% from 13 tests

Analyzing the main PHP file in "Cookie Wise" version 1.1.4
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cookie-wise.php" instead of "cookiewise.php")

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
Success! There were no dangerous files found in this plugin226 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16848226

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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