84% simasicher-dsgvo-cookie

Code Review | SimaCookie

WordPress plugin SimaCookie scored 84% from 54 tests.

About plugin

  • Plugin page: simasicher-dsgvo-...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0.1
  • WordPress version: 5.8.1
  • First release: Jun 26, 2018
  • Latest release: Dec 17, 2018
  • Number of updates: 17
  • Update frequency: every 10.3 days
  • Top authors: wpsimasicher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,389 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼140.34ms] Passed 4 tests

Analyzing server-side resources used by SimaCookie
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2133.75 ▲6.64
Dashboard /wp-admin3.14 ▲0.0848.70 ▲1.86
Posts /wp-admin/edit.php3.19 ▲0.0747.36 ▲9.05
Add New Post /wp-admin/post-new.php5.49 ▲0.0685.60 ▼573.17
Media Library /wp-admin/upload.php3.08 ▲0.0735.85 ▲3.31

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 2 new options
New WordPress options
sima_eucookie
sima_version_number

Browser metrics Passed 4 tests

SimaCookie: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,837 ▲24216.38 ▲0.8515.15 ▲5.1043.60 ▼10.35
Dashboard /wp-admin2,990 ▲565.91 ▼0.07136.43 ▼9.61103.86 ▼8.38
Posts /wp-admin/edit.php2,756 ▲202.72 ▲0.0265.04 ▼1.8092.16 ▲9.46
Add New Post /wp-admin/post-new.php1,684 ▲118.84 ▲0.16377.43 ▲9.64111.06 ▲4.54
Media Library /wp-admin/upload.php1,824 ▲175.04 ▲0.02146.47 ▲8.27119.19 ▲1.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 2 options in the database
    • sima_version_number
    • sima_eucookie

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simasicher-dsgvo-cookie/inc/tinymce.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

simasicher-dsgvo-cookie/simasicher-dsgvo-cookie.php Passed 13 tests

The main PHP file in "SimaCookie" ver. 1.3.2 adds more information about the plugin and also serves as the entry point for this plugin
88 characters long description:
Blockiere ohne Zustimmung alle Cookies und passe den Cookie-Hinweis deinen Wünschen an.

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
Success! There were no dangerous files found in this plugin15,146 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52,9022,47313,752
PHP510220682
CSS36213558
PO File16471138
XML10016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions32
▷ Named functions2887.50%
▷ Anonymous functions412.50%
Constants0
▷ Global constants00.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 PNG file occupies 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/simasicher_logo_name.png85.51KB21.33KB▼ 75.06%