62% anfrageformular

Code Review | Anfrageformular – Multi Step Drag & Drop Formular Builder – Leadgenerierung

WordPress plugin Anfrageformular – Multi Step Drag & Drop Formular Builder – Leadgenerierung scored 62% from 54 tests.

About plugin

  • Plugin page: anfrageformular
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 5.9.2
  • First release: Aug 13, 2020
  • Latest release: Nov 23, 2020
  • Number of updates: 7
  • Update frequency: every 14.6 days
  • Top authors: anfrageformular (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active / 4,714 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.58MB] [CPU: ▼289.34ms] Passed 4 tests

An overview of server-side resources used by Anfrageformular – Multi Step Drag & Drop Formular Builder – Leadgenerierung
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.4961.71 ▲13.14
Dashboard /wp-admin4.05 ▲0.6544.92 ▲6.76
Posts /wp-admin/edit.php4.28 ▲0.6444.49 ▲8.43
Add New Post /wp-admin/post-new.php7.52 ▲0.5597.21 ▼1,176.87
Media Library /wp-admin/upload.php4.00 ▲0.7128.78 ▲4.33
Formulare /wp-admin/edit.php?post_type=af2_formular4.0431.99
Fragen /wp-admin/edit.php?post_type=af2_frage4.0430.67
LeadDetails /wp-admin/admin.php?page=af2_lead_details3.8128.56
Kontaktformularbuilder /wp-admin/admin.php?page=af2_kontaktformularbuilder3.8127.70
Formularbuilder /wp-admin/admin.php?page=af2_formularbuilder3.8129.98
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius4.1929.62
Kontaktformulare /wp-admin/edit.php?post_type=af2_kontaktformular4.0436.82
Fragenbuilder /wp-admin/admin.php?page=af2_fragenbuilder3.9931.43

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 245 new files
Database: no new tables, 6 new options
New WordPress options
fs_gdpr
fs_debug_mode
fs_active_plugins
af2_version
af2_impressions
fs_accounts

Browser metrics Passed 4 tests

An overview of browser requirements for Anfrageformular – Multi Step Drag & Drop Formular Builder – Leadgenerierung
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,997 ▲24316.40 ▲0.8311.09 ▲5.052.58 ▲0.17
Dashboard /wp-admin2,959 ▲986.00 ▼0.17117.20 ▼10.51185.43 ▲21.83
Posts /wp-admin/edit.php2,747 ▲533.25 ▲0.0263.06 ▼0.48152.38 ▲10.27
Add New Post /wp-admin/post-new.php1,790 ▲12220.16 ▲1.47370.65 ▼38.30191.27 ▲34.80
Media Library /wp-admin/upload.php1,753 ▲555.71 ▲0.19120.05 ▼12.38209.99 ▲27.00
Formulare /wp-admin/edit.php?post_type=af2_formular1,4293.2959.29129.84
Fragen /wp-admin/edit.php?post_type=af2_frage1,4293.1659.45129.40
LeadDetails /wp-admin/admin.php?page=af2_lead_details1,1883.0156.31225.39
Kontaktformularbuilder /wp-admin/admin.php?page=af2_kontaktformularbuilder1,1313.4062.80179.01
Formularbuilder /wp-admin/admin.php?page=af2_formularbuilder1,1573.7266.63205.33
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,4612.5253.54111.47
Kontaktformulare /wp-admin/edit.php?post_type=af2_kontaktformular1,4333.0860.73124.60
Fragenbuilder /wp-admin/admin.php?page=af2_fragenbuilder1,3945.2680.41192.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/anfrageformular/freemius/includes/class-freemius.php+8540
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 6 options
    • fs_gdpr
    • fs_accounts
    • af2_impressions
    • fs_debug_mode
    • af2_version
    • fs_active_plugins

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/anfrageformular/admin/Admin.php
    • > /wp-content/plugins/anfrageformular/settings.php
    • > /wp-content/plugins/anfrageformular/freemius/templates/ajax-loader.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/anfrageformular/frontend/frontend_view.php:775
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/anfrageformular/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/anfrageformular/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/anfrageformular/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/anfrageformular/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/anfrageformular/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/anfrageformular/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/anfrageformular/admin/menus/70_Formularbuilder.php:256
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/anfrageformular/admin/menu_tools.php:764
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/anfrageformular/freemius/templates/account/partials/addon.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=af2_kontaktformularbuilder
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'questions')" "TypeError: Cannot read properties of undefined (reading 'questions')\n at af2_kfb_load_content (/wp-content/plugins/anfrageformular/res/scripts/af2_kontaktformularbuilder_c.js?ver=5.9.2:542:16)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/anfrageformular/res/scripts/af2_kontaktformularbuilder_c.js?ver=5.9.2:31:9)\n at HTMLDocument.dispatch (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:43064)\n at HTMLDocument.v.handle (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:41048)\n at Object.trigger (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:71515)\n at HTMLDocument.\u003Canonymous> (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:72110)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:3003)\n at s.fn.init.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:1481)\n at s.fn.init.trigger (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:72086)\n at af2_throw_event (/wp-content/plugins/anfrageformular/res/scripts/af2_builder.js?ver=5.9.2:184:16)" undefined
    • > GET request to /wp-admin/admin.php?page=af2_kontaktformularbuilder
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'questions')
    • > GET request to /wp-admin/admin.php?page=af2_fragenbuilder
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'answers')" "TypeError: Cannot read properties of undefined (reading 'answers')\n at af2_fb_load_content (/wp-content/plugins/anfrageformular/res/scripts/af2_fragenbuilder_c.js?ver=5.9.2:166:27)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/anfrageformular/res/scripts/af2_fragenbuilder_c.js?ver=5.9.2:7:9)\n at HTMLDocument.dispatch (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:43064)\n at HTMLDocument.v.handle (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:41048)\n at Object.trigger (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:71515)\n at HTMLDocument.\u003Canonymous> (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:72110)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:3003)\n at s.fn.init.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:1481)\n at s.fn.init.trigger (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:72086)\n at af2_throw_event (/wp-content/plugins/anfrageformular/res/scripts/af2_builder.js?ver=5.9.2:184:16)" undefined
    • > GET request to /wp-admin/admin.php?page=af2_fragenbuilder
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'answers')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

anfrageformular/Anfrageformular.php 85% from 13 tests

The main PHP file in "Anfrageformular – Multi Step Drag & Drop Formular Builder – Leadgenerierung" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("anfrageformular.php" instead of "Anfrageformular.php")
  • Description: The description should be shorter than 140 characters (currently 373 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin59,932 lines of code in 175 files:
LanguageFilesBlank linesComment linesLines of code
PHP1228,11716,85133,795
JavaScript293,6253,27321,542
CSS205036972,373
PO File15987351,980
Markdown1680214
JSON20028

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,895)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity72.93
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes57
▷ Abstract classes23.51%
▷ Concrete classes5596.49%
▷ Final classes00.00%
Methods1,193
▷ Static methods17314.50%
▷ Public methods84871.08%
▷ Protected methods151.26%
▷ Private methods33027.66%
Functions162
▷ Named functions16098.77%
▷ Anonymous functions21.23%
Constants151
▷ Global constants12683.44%
▷ Class constants2516.56%
▷ Public constants25100.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
12 PNG files occupy 0.28MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
question_types/2_Multiselect/icon.png7.39KB4.50KB▼ 39.08%
pro_qtypes/5_Datum/icon.png5.32KB2.16KB▼ 59.39%
pro_qtypes/4_Textbereich/icon.png4.67KB1.74KB▼ 62.63%
res/menu_icon.png2.57KB1.30KB▼ 49.22%
res/pro/video.png68.09KB25.23KB▼ 62.94%