88% kletterpartner-suche

Code Review | Kletterpartner-Suche

WordPress plugin Kletterpartner-Suche scored 88% from 54 tests.

About plugin

  • Plugin page: kletterpartner-suche
  • Plugin version: 2.4.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.6.1
  • WordPress version: 5.9.2
  • First release: Sep 21, 2018
  • Latest release: Feb 19, 2021
  • Number of updates: 309
  • Update frequency: every 2.9 days
  • Top authors: nirus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,321 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲2.07MB] [CPU: ▼290.64ms] Passed 4 tests

A check of server-side resources used by Kletterpartner-Suche
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.56 ▲2.0564.08 ▲12.81
Dashboard /wp-admin5.52 ▲2.1144.31 ▲11.09
Posts /wp-admin/edit.php5.74 ▲2.1046.68 ▲10.73
Add New Post /wp-admin/post-new.php8.98 ▲2.01101.30 ▼1,194.68
Media Library /wp-admin/upload.php5.40 ▲2.1135.95 ▲10.30
GTC / GDPR§ /wp-admin/admin.php?page=kletterpartner-suche/kps-privacy.php5.3732.65
Entries0 /wp-admin/admin.php?page=kletterpartner-suche/entries.php5.3431.60
Design /wp-admin/admin.php?page=kletterpartner-suche/design.php5.3734.66
Email Templates /wp-admin/admin.php?page=kletterpartner-suche/email.php5.3734.12
Uninstallation /wp-admin/admin.php?page=kletterpartner-suche/uninstall.php5.3734.57
Settings /wp-admin/admin.php?page=kletterpartner-suche/settings.php5.3431.68
Climbing-Partner2 /wp-admin/admin.php?page=kletterpartner-suche/kps.php5.3832.76

Server storage [IO: ▲2.87MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 153 new files
Database: 2 new tables, 19 new options
New tables
wp_kps_requirement
wp_kps_entries
New WordPress options
kps_mailFromCC
kps_captchakeys
kps_dsgvo
kps_deleteNoEntryTime
kps_kpsCounter
kps_frontendPagination
kps_captcha
kps_userSettings
kps_output
kps_report
...

Browser metrics Passed 4 tests

Kletterpartner-Suche: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,964 ▲24216.62 ▲0.679.77 ▲3.952.31 ▲0.04
Dashboard /wp-admin2,978 ▲1176.15 ▲0.10120.40 ▼13.22156.64 ▼6.04
Posts /wp-admin/edit.php2,774 ▲863.36 ▲0.1268.09 ▲3.30141.15 ▼1.78
Add New Post /wp-admin/post-new.php1,810 ▲9920.88 ▲0.15426.32 ▼21.60157.39 ▲2.79
Media Library /wp-admin/upload.php1,780 ▲855.54 ▲0.04133.39 ▼10.91186.37 ▼4.87
GTC / GDPR§ /wp-admin/admin.php?page=kletterpartner-suche/kps-privacy.php1,2362.7057.07144.44
Entries0 /wp-admin/admin.php?page=kletterpartner-suche/entries.php1,4632.7055.48136.75
Design /wp-admin/admin.php?page=kletterpartner-suche/design.php4,5422.7260.97127.87
Email Templates /wp-admin/admin.php?page=kletterpartner-suche/email.php2,4342.7057.20113.88
Uninstallation /wp-admin/admin.php?page=kletterpartner-suche/uninstall.php1,2112.6856.83112.82
Settings /wp-admin/admin.php?page=kletterpartner-suche/settings.php2,6922.8955.67126.93
Climbing-Partner2 /wp-admin/admin.php?page=kletterpartner-suche/kps.php2,1853.2869.11150.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kletterpartner-suche/entries.php
    • > Notice in wp-content/plugins/kletterpartner-suche/admin/kps-entries.php+71
    Undefined index: show
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kletterpartner-suche/entries.php
    • > Notice in wp-content/plugins/kletterpartner-suche/admin/kps-entries.php+485
    Undefined variable: show
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kletterpartner-suche/entries.php
    • > Notice in wp-content/plugins/kletterpartner-suche/admin/kps-entries.php+934
    Undefined variable: pagination
    • > GET request to /wp-admin/admin.php?page=kletterpartner-suche/settings.php
    • > Notice in wp-content/plugins/kletterpartner-suche/admin/kps-settings.php+1440
    Undefined variable: checkedDeleteTimeEntry
    • > GET request to /wp-admin/admin.php?page=kletterpartner-suche/settings.php
    • > Notice in wp-content/plugins/kletterpartner-suche/admin/kps-settings.php+1444
    Undefined variable: checkedDeleteTimeNoEntry
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kletterpartner-suche/settings.php
    • > Notice in wp-content/plugins/kletterpartner-suche/admin/kps-settings.php+300
    Undefined variable: countAction
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kletterpartner-suche/settings.php
    • > Notice in wp-content/plugins/kletterpartner-suche/admin/kps-settings.php+300
    Trying to get property 'isLockedBoth' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kletterpartner-suche/settings.php
    • > Notice in wp-content/plugins/kletterpartner-suche/admin/kps-settings.php+1319
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 33× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/functions/kps-privacy.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/classes/kps-delete.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/classes/kps-activation.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/admin/kps-install.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/classes/kps-entries.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/classes/kps-hash.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/admin/kps-email.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/frontend/kps-delete.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/functions/kps-mail-contents.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/kletterpartner-suche/functions/kps-frontend-pagination.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: wandern, klettern, climb, climbing, tekking...

kletterpartner-suche/kps.php 85% from 13 tests

"Kletterpartner-Suche" version 2.4.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kletterpartner-suche.php" instead of "kps.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected18,805 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
PHP331,4302,45810,240
PO File62,4983,5517,468
CSS277104497
SVG7500307
Markdown1360165
JavaScript23589128

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity29.44
▷ Minimum class complexity2.00
▷ Maximum class complexity100.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods126
▷ Static methods43.17%
▷ Public methods11692.06%
▷ Protected methods00.00%
▷ Private methods107.94%
Functions84
▷ Named functions84100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.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
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/gfx/valid-html401-blue.png1.63KB1.42KB▼ 12.64%
admin/gfx/invisible_badge.png4.85KB2.44KB▼ 49.65%
admin/gfx/mysql.png8.83KB3.82KB▼ 56.76%
admin/gfx/html5.png1.32KB0.96KB▼ 27.10%
admin/gfx/php7.png1.50KB1.44KB▼ 3.85%