78% sypher-cookie-consent

Code Review | Sypher Cookie Consent

WordPress plugin Sypher Cookie Consent scored78%from 54 tests.

About plugin

  • Plugin page: sypher-cookie-con...
  • Plugin version: 2023.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2021
  • Latest release: Oct 12, 2023
  • Number of updates: 4
  • Update frequency: every 195.5 days
  • Top authors: syphereu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /344 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.95ms] Passed 4 tests

Server-side resources used by Sypher Cookie Consent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.25 ▲1.71
Dashboard /wp-admin3.33 ▲0.0245.87 ▼1.61
Posts /wp-admin/edit.php3.38 ▲0.0243.61 ▼6.68
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.44 ▲6.26
Media Library /wp-admin/upload.php3.25 ▲0.0234.02 ▲2.78
Sypher Cookie Consent /wp-admin/options-general.php?page=sypher_consent3.1928.80

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sypher Cookie Consent
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.14 ▼0.261.73 ▲0.2843.26 ▲4.14
Dashboard /wp-admin2,196 ▲325.55 ▼0.0381.21 ▼28.2536.41 ▼9.81
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0237.51 ▼1.1332.62 ▼7.18
Add New Post /wp-admin/post-new.php1,540 ▲1418.14 ▼5.48612.25 ▼7.9169.06 ▲18.45
Media Library /wp-admin/upload.php1,404 ▲14.18 ▼0.0494.64 ▼8.1740.17 ▼2.36
Sypher Cookie Consent /wp-admin/options-general.php?page=sypher_consent8331.9922.2425.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=sypher_consent
    • > Notice in wp-content/plugins/sypher-cookie-consent/sypherConsent.php+46
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sypher-cookie-consent/sypherConsent.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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
6 plugin tags: consent, cookie, gdpr, compliance, cookiebanner...

sypher-cookie-consent/sypherConsent.php 77% from 13 tests

The principal PHP file in "Sypher Cookie Consent" v. 2023.1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 526 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sypher-cookie-consent.php" instead of "sypherConsent.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected94 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP122986
Markdown1708

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
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%
Functions7
▷ Named functions7100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/sypher-blue.png5.34KB2.06KB▼ 61.41%