83% trustedshops-consent-manager

Code Review | Trusted Shops Consent-Manager

WordPress plugin Trusted Shops Consent-Manager scored83%from 54 tests.

About plugin

  • Plugin page: trustedshops-cons...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: May 3, 2021
  • Latest release: Feb 7, 2023
  • Number of updates: 45
  • Update frequency: every 14.4 days
  • Top authors: wnm0dheinrich (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,195 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.09ms] Passed 4 tests

Analyzing server-side resources used by Trusted Shops Consent-Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.19 ▼4.67
Dashboard /wp-admin3.34 ▲0.0348.66 ▼1.67
Posts /wp-admin/edit.php3.39 ▲0.0346.71 ▼2.25
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.34 ▼11.75
Media Library /wp-admin/upload.php3.26 ▲0.0335.23 ▲2.21

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Trusted Shops Consent-Manager: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲14613.36 ▼0.961.91 ▲0.2243.38 ▼2.09
Dashboard /wp-admin2,272 ▲814.87 ▲0.01107.48 ▼7.1737.91 ▼7.19
Posts /wp-admin/edit.php2,163 ▲742.40 ▲0.3936.75 ▲1.3630.78 ▼6.12
Add New Post /wp-admin/post-new.php1,540 ▲2121.60 ▼1.61662.65 ▼11.5662.02 ▲7.22
Media Library /wp-admin/upload.php1,459 ▲684.77 ▲0.57100.54 ▲3.7541.57 ▼2.71

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trustedshops-consent-manager/plugin.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Screenshots: Add a description for screenshot #2 in trustedshops-consent-manager/assets to your readme.txt
  • Screenshots: Screenshot #1 (Trusted Shops Consent Manager - Settings) image not found
You can look at the official readme.txt

trustedshops-consent-manager/plugin.php 92% from 13 tests

The primary PHP file in "Trusted Shops Consent-Manager" version 1.2.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("trustedshops-consent-manager.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin228 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP11637124
Sass25038
CSS23635
SVG10117
JavaScript30014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png27.29KB14.25KB▼ 47.79%