83% securiti-cookie-consent

Code Review | Cookie Consent for GDPR/CCPA | Securiti

WordPress plugin Cookie Consent for GDPR/CCPA | Securiti scored83%from 54 tests.

About plugin

  • Plugin page: securiti-cookie-c...
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 7, 2020
  • Latest release: Feb 16, 2023
  • Number of updates: 21
  • Update frequency: every 39.6 days
  • Top authors: securitiai (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

100+ active /6,902 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
Installer ran successfully

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

This is a short check of server-side resources used by Cookie Consent for GDPR/CCPA | Securiti
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.02 ▲1.49
Dashboard /wp-admin3.32 ▼0.0251.35 ▼13.89
Posts /wp-admin/edit.php3.37 ▲0.0251.61 ▲0.35
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.64 ▼10.29
Media Library /wp-admin/upload.php3.25 ▲0.0240.68 ▼0.16
Cookie Consent for GDPR/CCPA | securiti /wp-admin/options-general.php?page=scc3.2736.84

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
scc_notice_update_date

Browser metrics Passed 4 tests

Cookie Consent for GDPR/CCPA | Securiti: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7514.35 ▼0.011.96 ▲0.3243.89 ▼7.45
Dashboard /wp-admin2,206 ▲385.63 ▲0.0791.40 ▼9.6243.44 ▼3.18
Posts /wp-admin/edit.php2,114 ▲141.91 ▼0.0933.60 ▼2.7132.94 ▼2.73
Add New Post /wp-admin/post-new.php1,539 ▼14123.34 ▲1.11669.60 ▲11.9058.56 ▼8.38
Media Library /wp-admin/upload.php1,411 ▲174.17 ▼0.03112.49 ▲8.1046.52 ▲3.19
Cookie Consent for GDPR/CCPA | securiti /wp-admin/options-general.php?page=scc9511.8926.18152.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • scc_notice_update_date

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/securiti-cookie-consent/admin/options-page.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #6 (Elegant Consumer Frontend), #7 (Fully Automated Backend), #8 (Privacy Regulation Intelligent, Everywhere)
Please take inspiration from this readme.txt

securiti-cookie-consent/scc.php 69% from 13 tests

The main file in "Cookie Consent for GDPR/CCPA | Securiti" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("securiti-cookie-consent.php" instead of "scc.php")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Description: Please keep the plugin description shorter than 140 characters (currently 154 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin727 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6124340263
Sass2500218
CSS100217
JavaScript193129

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.67
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2086.96%
▷ Protected methods00.00%
▷ Private methods313.04%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.65MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/media/logo.png13.47KB5.71KB▼ 57.64%
admin/media/innovation-award.png11.51KB5.37KB▼ 53.33%
admin/media/header-bg.png3.46KB3.69KB0.00%
admin/media/product-consent-landing.png609.38KB190.85KB▼ 68.68%
admin/media/iapp-innovation-award-2020.png7.13KB7.57KB0.00%