84% frankencookie

Code Review | FrankenCookie

WordPress plugin FrankenCookie scored 84% from 54 tests.

About plugin

  • Plugin page: frankencookie
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.7
  • WordPress version: 5.8.1
  • First release: Apr 5, 2013
  • Latest release: Mar 31, 2021
  • Number of updates: 11
  • Update frequency: every 265.2 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by FrankenCookie
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.35 ▲11.87
Dashboard /wp-admin3.10 ▲0.0439.26 ▼7.54
Posts /wp-admin/edit.php3.15 ▲0.0336.40 ▼16.23
Add New Post /wp-admin/post-new.php5.45 ▲0.0290.55 ▼562.80
Media Library /wp-admin/upload.php3.04 ▲0.0432.64 ▼1.28

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
widget_frankencookie

Browser metrics Passed 4 tests

Checking browser requirements for FrankenCookie
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲4115.87 ▲0.277.35 ▼1.2249.38 ▲3.31
Dashboard /wp-admin2,973 ▲395.87 ▼0.08138.84 ▼8.12120.97 ▲0.97
Posts /wp-admin/edit.php2,736 ▼32.69 ▼0.0063.94 ▼1.7389.50 ▼2.89
Add New Post /wp-admin/post-new.php1,683 ▲17918.81 ▲0.27381.12 ▲5.60110.84 ▼2.80
Media Library /wp-admin/upload.php1,810 ▼05.00 ▼0.00147.78 ▲1.68119.85 ▼3.34

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
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_frankencookie

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/frankencookie/frankencookie.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/frankencookie/class-frankencookie-widget.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (FrankenCookie Widget Settings), #2 (Example FrankenCookie Widget Appearance)
You can look at the official readme.txt

frankencookie/frankencookie.php Passed 13 tests

The main PHP file in "FrankenCookie" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
113 characters long description:
FrankenCookie provides a widget that offers visitors an explanation about cookies being placed on their computer.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin172 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22791172

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods450.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png24.00KB9.34KB▼ 61.07%
screenshot-2.png67.51KB28.16KB▼ 58.28%