83% consent-manager

Code Review | consentmanager

WordPress plugin consentmanager scored83%from 54 tests.

About plugin

  • Plugin page: consent-manager
  • Plugin version: 3.0.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Mar 24, 2023
  • Number of updates: 41
  • Update frequency: every 42.8 days
  • Top authors: consentmanager (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

4,000+ active /38,672 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.97ms] Passed 4 tests

Server-side resources used by consentmanager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0852.83 ▲3.42
Dashboard /wp-admin3.41 ▲0.0250.91 ▼14.09
Posts /wp-admin/edit.php3.52 ▲0.1348.82 ▼1.68
Add New Post /wp-admin/post-new.php5.99 ▲0.0688.93 ▼7.52
Media Library /wp-admin/upload.php3.33 ▲0.0638.90 ▲8.05

Server storage [IO: ▲0.35MB] [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, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for consentmanager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.10 ▼0.491.95 ▲0.1542.41 ▲1.43
Dashboard /wp-admin2,211 ▲315.49 ▼0.1289.93 ▲2.7684.88 ▲43.11
Posts /wp-admin/edit.php2,110 ▲102.12 ▲0.1033.80 ▼1.6432.11 ▼3.71
Add New Post /wp-admin/post-new.php1,538 ▲1223.16 ▼0.14632.91 ▼35.27168.07 ▲101.06
Media Library /wp-admin/upload.php1,413 ▲104.21 ▲0.0395.65 ▼4.6377.85 ▲35.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/consent-manager/views/admin.php
    • > /wp-content/plugins/consent-manager/consentmanager.php

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)
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Donate link: Please fix this invalid url: "no donate-link provided"
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can look at the official readme.txt

consent-manager/consentmanager.php 85% from 13 tests

The principal PHP file in "consentmanager" v. 3.0.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("consent-manager.php" instead of "consentmanager.php")
  • Description: The description should be shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected492 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP391263424
CSS10068

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.15
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods13100.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.21MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo_neu.png19.21KB7.45KB▼ 61.23%
assets/images/cmpid.png34.77KB12.74KB▼ 63.36%
assets/images/cmpcodeid.png34.38KB12.61KB▼ 63.31%
assets/images/cmphost.png82.98KB32.33KB▼ 61.03%
assets/images/cmpcdn.png36.03KB13.00KB▼ 63.91%