84% cookies-manager

Code Review | Cookies Manager

WordPress plugin Cookies Manager scored84%from 54 tests.

About plugin

  • Plugin page: cookies-manager
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2014
  • Latest release: Jun 11, 2014
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: fasterthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,245 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
Install script ran successfully

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

Server-side resources used by Cookies Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.63 ▼6.86
Dashboard /wp-admin3.31 ▲0.0045.40 ▼3.22
Posts /wp-admin/edit.php3.36 ▲0.0048.02 ▲2.30
Add New Post /wp-admin/post-new.php5.89 ▲0.00102.46 ▲15.02
Media Library /wp-admin/upload.php3.23 ▲0.0034.91 ▲1.27

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cookies Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,006 ▲27114.10 ▼0.299.24 ▲7.4944.41 ▼0.64
Dashboard /wp-admin2,203 ▲154.83 ▼1.03104.09 ▼14.7440.94 ▼6.31
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0535.42 ▲0.7633.44 ▼1.95
Add New Post /wp-admin/post-new.php1,557 ▲4323.37 ▼0.01648.14 ▲65.8652.43 ▼3.72
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0396.35 ▼1.1540.90 ▼0.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cookies-manager/cookiesmanager.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

cookies-manager/cookiesmanager.php 92% from 13 tests

The primary PHP file in "Cookies Manager" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cookies-manager.php" instead of "cookiesmanager.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
Everything looks great! No dangerous files found in this plugin1,022 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS13818734
JavaScript29734232
PHP1101056

PHP code Passed 2 tests

An overview 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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin