78% sv-forms

Code Review | SV Forms

WordPress plugin SV Forms scored78%from 54 tests.

About plugin

  • Plugin page: sv-forms
  • Plugin version: 2.0.02
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: May 23, 2023
  • Number of updates: 16
  • Update frequency: every 72.2 days
  • Top authors: Matthias Reuter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,124 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by SV Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.18 ▲1.7247.38 ▲6.68
Dashboard /wp-admin5.26 ▲1.9651.80 ▲4.84
Posts /wp-admin/edit.php5.31 ▲1.9552.70 ▼1.17
Add New Post /wp-admin/post-new.php8.03 ▲2.1494.55 ▼10.48
Media Library /wp-admin/upload.php5.11 ▲1.8944.28 ▲9.66
Info /wp-admin/admin.php?page=straightvisions5.1948.82
SV Forms /wp-admin/admin.php?page=sv_forms5.1543.62

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 477 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
sv_forms_scripts_settings_sv_core_color_picker_attached
sv_forms_index
sv_forms_scripts_settings_flush_css_cache
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for SV Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲23613.54 ▼1.051.94 ▼0.0641.58 ▼6.59
Dashboard /wp-admin2,353 ▲1625.86 ▼0.16104.40 ▲3.7174.46 ▲31.24
Posts /wp-admin/edit.php2,230 ▲1412.00 ▼0.0433.82 ▼5.4931.61 ▼9.40
Add New Post /wp-admin/post-new.php6,558 ▲5,01623.40 ▲5.131,016.27 ▲417.1339.99 ▼39.25
Media Library /wp-admin/upload.php1,529 ▲1414.23 ▼0.0298.50 ▼5.7075.41 ▲33.31
Info /wp-admin/admin.php?page=straightvisions1,58710.65206.67151.80
SV Forms /wp-admin/admin.php?page=sv_forms1,48010.5276.75135.62

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
  • The uninstall procedure has failed, leaving 8 options in the database
    • sv_forms_scripts_settings_sv_core_color_picker_attached
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • sv_forms_scripts_settings_flush_css_cache
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_checkbox_field.php
    • > /wp-content/plugins/sv-forms/src/lib/modules/sv_forms/lib/frontend/tpl/thank_you.php
    • > /wp-content/plugins/sv-forms/src/lib/modules/mail/tpl/mail_footer.php
  • 289× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_select_page.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_textarea.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_box_shadow_tpl/blur_radius.php on line 1
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_number.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_font_tpl/font_weight.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'sv_core\\settings' not found in wp-content/plugins/sv-forms/src/core_plugin/core/settings/modules/setting_url/setting_url.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_font_tpl/color.php on line 3
    • > PHP Notice
      Undefined variable: props in wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_margin_field.php on line 19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_javascript.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sv-forms/src/core_plugin/core/settings/tpl/setting_date.php:8

User-side errors Passed 1 test

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

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
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5 in sv-forms/assets to your readme.txt
You can look at the official readme.txt

sv-forms/sv_forms.php 85% from 13 tests

The main PHP file in "SV Forms" ver. 2.0.02 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Name the main plugin file the same as the plugin slug ("sv-forms.php" instead of "sv_forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin24,216 lines of code in 357 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1391,3376448,662
PHP1401,7411,6858,598
CSS493671183,406
PO File25351,1651,006
Sass1513124832
JSON300800
SVG200585
JSX56125325
Markdown2002

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.39
Average class complexity16.01
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes67
▷ Abstract classes11.49%
▷ Concrete classes6698.51%
▷ Final classes00.00%
Methods649
▷ Static methods81.23%
▷ Public methods48274.27%
▷ Protected methods8513.10%
▷ Private methods8212.63%
Functions23
▷ Named functions00.00%
▷ Anonymous functions23100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin