83% wpss-cookies

Code Review | WPSS Cookies

WordPress plugin WPSS Cookies scored83%from 54 tests.

About plugin

  • Plugin page: wpss-cookies
  • Plugin version: 1.3.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 6.3.1
  • First release: Oct 7, 2020
  • Latest release: Oct 27, 2021
  • Number of updates: 26
  • Update frequency: every 14.9 days
  • Top authors: angelorocha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /508 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼10.79ms] Passed 4 tests

This is a short check of server-side resources used by WPSS Cookies
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.56 ▼10.03
Dashboard /wp-admin3.41 ▲0.0650.57 ▼9.77
Posts /wp-admin/edit.php3.52 ▲0.1749.04 ▼19.67
Add New Post /wp-admin/post-new.php5.99 ▲0.10101.56 ▼1.92
Media Library /wp-admin/upload.php3.33 ▲0.1035.37 ▼3.70

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 13 new options
New WordPress options
wpss_cookie_life
widget_recent-posts
wpss_cookie_name
widget_theysaidso_widget
wpss_cookie_message
widget_recent-comments
wpss_message_position
wpss_show_cookie_message
db_upgraded
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by WPSS Cookies
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲9013.66 ▼0.714.57 ▲2.5642.69 ▼3.39
Dashboard /wp-admin2,229 ▲265.86 ▲0.99100.74 ▼0.6581.21 ▲39.50
Posts /wp-admin/edit.php2,108 ▲52.03 ▼0.0036.18 ▼5.3434.48 ▼1.57
Add New Post /wp-admin/post-new.php1,689 ▲15522.33 ▼0.95715.92 ▲1.5155.89 ▼1.02
Media Library /wp-admin/upload.php1,405 ▲54.23 ▼0.01102.72 ▼4.7673.32 ▲25.05

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_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpss-cookies/wpss_cookies.php

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • License uri: Invalid url: "/LICENCE"
  • Screenshots: Please describe screenshot #0 in wpss-cookies/assets to your readme.txt
The official readme.txt might help

wpss-cookies/wpss_cookies.php 85% from 13 tests

"WPSS Cookies" version 1.3.5'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:
  • Requires at least: Required version must match the one declared in readme.txt ("5.2" instead of "5.5")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpss-cookies.php" instead of "wpss_cookies.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin635 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP340160291
CSS22721236
PO File1202268
JavaScript20637
Markdown1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity7.00
▷ Minimum class complexity5.00
▷ Maximum class complexity9.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods28
▷ Static methods517.86%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/facebook.png0.50KB0.38KB▼ 24.51%
assets/images/buttons_style.fw.png77.00KB6.72KB▼ 91.27%
assets/images/github.png0.40KB0.32KB▼ 21.17%
assets/images/forest_op.png2.60KB0.94KB▼ 63.69%
assets/images/load.png8.18KB0.44KB▼ 94.63%