57% bsd-verwaltung

Code Review | BSD Verwaltung

WordPress plugin BSD Verwaltung scored57%from 54 tests.

About plugin

  • Plugin page: bsd-verwaltung
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.8
  • WordPress version: 6.3.1
  • First release: Jun 21, 2017
  • Latest release: Aug 30, 2017
  • Number of updates: 21
  • Update frequency: every 5.9 days
  • Top authors: mreichardt1992 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,098 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.78MB] [CPU: ▼56.05ms] Passed 4 tests

Server-side resources used by BSD Verwaltung
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.255.25 ▼38.03
Dashboard /wp-admin2.23 ▼1.076.47 ▼51.38
Posts /wp-admin/edit.php2.23 ▼1.127.13 ▼44.72
Add New Post /wp-admin/post-new.php2.23 ▼3.656.38 ▼90.06
Media Library /wp-admin/upload.php2.23 ▼1.006.48 ▼31.57
Alle Dienste /wp-admin/edit.php?post_type=bsds2.236.80
Dienst hinzufügen /wp-admin/post-new.php?post_type=bsds2.236.08

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 14 new options
New WordPress options
db_upgraded
theysaidso_admin_options
cron_last_search_for_bsd
widget_recent-posts
reject_on_bsd_by_admin
can_compress_scripts
bsd_current_db_version
color_picker_panel_header_active
widget_recent-comments
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for BSD Verwaltung
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲22514.11 ▼0.105.29 ▲3.4740.64 ▲0.21
Dashboard /wp-admin2,278 ▲1014.93 ▼0.7392.33 ▲2.2439.39 ▼3.80
Posts /wp-admin/edit.php2,188 ▲882.39 ▲0.2442.46 ▲8.1654.66 ▲18.45
Add New Post /wp-admin/post-new.php1,596 ▲6523.55 ▲0.73690.38 ▲28.6737.42 ▼19.75
Media Library /wp-admin/upload.php1,493 ▲934.78 ▲0.36101.40 ▼0.6740.21 ▼4.77
Alle Dienste /wp-admin/edit.php?post_type=bsds1,2262.5038.4443.69
Dienst hinzufügen /wp-admin/post-new.php?post_type=bsds2,3797.95171.8765.32
Berichte /wp-admin/bsd-verwaltung-report.php260.420.0713.77
Einstellungen /wp-admin/bsd-verwaltung-settings.php260.420.127.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 14 options
    • db_upgraded
    • agree_on_bsd
    • cron_last_search_for_bsd
    • bsd_current_db_version
    • access_for_frontend_panels
    • reject_on_bsd_by_user
    • color_picker_panel_header
    • reject_on_bsd_by_admin
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bsds
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bsds
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bsd_verwaltung_timepicker_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bsds
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bsd_verwaltung__timepicker_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bsds
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-datepicker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bsds
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-datepicker-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/bsd-verwaltung/bsd-verwaltung.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bsd-verwaltung/bsd-verwaltung-report.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bsd-verwaltung/bsd-verwaltung-backend.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bsd-verwaltung/bsd-verwaltung-user.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bsd-verwaltung/bsd-verwaltung-frontend.php:166
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bsd-verwaltung/bsd-verwaltung-settings.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bsds
    • > Network (severe)
    wp-content/plugins/bsd-verwaltung/js/admin_script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/bsd-verwaltung-report.php
    • > Network (severe)
    wp-admin/bsd-verwaltung-report.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/bsd-verwaltung-settings.php
    • > Network (severe)
    wp-admin/bsd-verwaltung-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

bsd-verwaltung/bsd-verwaltung.php Passed 13 tests

The main file in "BSD Verwaltung" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
86 characters long description:
Verwaltung und Vergabe von (Brandsicherheits-)Diensten an die Mannschaft der Feuerwehr

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
Good job! No executable or dangerous file extensions detected1,747 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP65141611,325
CSS3290236
JavaScript330698
Markdown137088

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions48
▷ Named functions4593.75%
▷ Anonymous functions36.25%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/truppfuehrer.png1.59KB1.19KB▼ 25.35%