89% wpp-set-cookie-expire

Code Review | Wpp Cookie Expire

WordPress plugin Wpp Cookie Expire scored89%from 54 tests.

About plugin

  • Plugin page: wpp-set-cookie-ex...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Jun 6, 2023
  • Number of updates: 5
  • Update frequency: every 450.2 days
  • Top authors: mhdryz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /487 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.68ms] Passed 4 tests

Server-side resources used by Wpp Cookie Expire
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0135.64 ▼1.32
Dashboard /wp-admin3.32 ▲0.0144.94 ▼1.39
Posts /wp-admin/edit.php3.37 ▲0.0147.98 ▼4.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.96 ▲0.76
Media Library /wp-admin/upload.php3.24 ▲0.0133.07 ▲0.25

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Wpp Cookie Expire
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.354.58 ▲2.8142.44 ▲3.48
Dashboard /wp-admin2,206 ▲185.88 ▲1.00105.60 ▲5.7840.52 ▲4.24
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0538.60 ▲1.5235.08 ▼0.05
Add New Post /wp-admin/post-new.php1,548 ▲1518.36 ▼4.72583.79 ▼73.3973.51 ▲13.49
Media Library /wp-admin/upload.php1,388 ▲64.25 ▲0.0993.95 ▼2.9240.75 ▲0.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Screenshot Admin Area)
The official readme.txt might help

wpp-set-cookie-expire/Wpp_cookie_expire.php 92% from 13 tests

The entry point to "Wpp Cookie Expire" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpp-set-cookie-expire.php" instead of "Wpp_cookie_expire.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP153239

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.31KB11.75KB▼ 49.59%