84% fripixel-cookies-permission

Code Review | Fripixel Cookie Permission

WordPress plugin Fripixel Cookie Permission scored84%from 54 tests.

About plugin

  • Plugin page: fripixel-cookies-...
  • Plugin version: 5.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 6.3.1
  • First release: Aug 12, 2021
  • Latest release: Aug 13, 2021
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: venturion (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /298 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
Installer ran successfully

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

Analyzing server-side resources used by Fripixel Cookie Permission
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.36 ▼2.04
Dashboard /wp-admin3.31 ▲0.0149.34 ▼4.75
Posts /wp-admin/edit.php3.37 ▲0.0147.11 ▼3.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.97 ▼18.43
Media Library /wp-admin/upload.php3.24 ▲0.0140.04 ▲3.71

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Fripixel Cookie Permission
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.38 ▲0.123.16 ▲1.2239.50 ▼0.89
Dashboard /wp-admin2,195 ▲185.66 ▲0.0091.05 ▲3.0838.95 ▼3.33
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0134.68 ▼9.5635.38 ▼5.30
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▲2.18613.85 ▼42.4560.53 ▲13.29
Media Library /wp-admin/upload.php1,394 ▼64.20 ▲0.0399.07 ▼16.9245.24 ▼8.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fripixel-cookies-permission/index.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: comments, spam

fripixel-cookies-permission/index.php 92% from 13 tests

"Fripixel Cookie Permission" version 5.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("fripixel-cookies-permission.php" instead of "index.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
There were no executable files found in this plugin695 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
Markdown41730360
JavaScript22819137
CSS212087
JSON20056
PHP191855

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin