78% wp-smart-cookie-allow

Code Review | WP Smart Cookie Allow

WordPress plugin WP Smart Cookie Allow scored78%from 54 tests.

About plugin

  • Plugin page: wp-smart-cookie-a...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: May 9, 2013
  • Latest release: May 11, 2013
  • Number of updates: 17
  • Update frequency: every 0.2 days
  • Top authors: Wuptii (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,700 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.05MB] [CPU: ▼12.34ms] Passed 4 tests

Server-side resources used by WP Smart Cookie Allow
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0421.46 ▼22.04
Dashboard /wp-admin3.39 ▲0.0843.90 ▼3.90
Posts /wp-admin/edit.php3.42 ▲0.0746.89 ▼1.50
Add New Post /wp-admin/post-new.php6.06 ▲0.1777.63 ▼20.29
Media Library /wp-admin/upload.php3.32 ▲0.1032.17 ▼3.14
Cookie Allow Permission /wp-admin/options-general.php?page=Cookies-allow3.2433.14

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
cookie_text_url
cookie_text_data
cookie_text_time
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP Smart Cookie Allow
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲8113.29 ▼1.022.05 ▼0.0445.58 ▼1.21
Dashboard /wp-admin2,213 ▲255.84 ▲0.8997.63 ▼11.8839.75 ▼2.06
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0040.03 ▲1.0236.00 ▲1.36
Add New Post /wp-admin/post-new.php1,517 ▼517.58 ▼5.51699.00 ▲4.2663.63 ▲14.28
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0596.83 ▼22.1639.72 ▼9.63
Cookie Allow Permission /wp-admin/options-general.php?page=Cookies-allow8442.0327.9130.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • cookie_text_url
    • cookie_text_time
    • widget_recent-comments
    • cookie_text_data
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-smart-cookie-allow/assets/noty.php
    • > /wp-content/plugins/wp-smart-cookie-allow/assets/noty-js.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-smart-cookie-allow/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: eu, allow, cookie, cookies, allow cookies...

wp-smart-cookie-allow/index.php 85% from 13 tests

Analyzing the main PHP file in "WP Smart Cookie Allow" version 1.3
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 328 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-smart-cookie-allow.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin830 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript315770618
PHP311434182
CSS131030

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/controls.png0.56KB0.57KB0.00%