52% formello

Code Review | Contact form builder for Gutenberg - Formello

WordPress plugin Contact form builder for Gutenberg - Formello scored52%from 54 tests.

About plugin

  • Plugin page: formello
  • Plugin version: 2.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2.2-6.3
  • WordPress version: 6.3.1
  • First release: Feb 19, 2021
  • Latest release: Aug 23, 2023
  • Number of updates: 118
  • Update frequency: every 7.8 days
  • Top authors: tropicalista (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,181 total downloads

Benchmarks

Plugin footprint 48% 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.31MB] [CPU: ▲8.16ms] Passed 4 tests

This is a short check of server-side resources used by Contact form builder for Gutenberg - Formello
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.69 ▲1.2350.80 ▲8.06
Dashboard /wp-admin4.64 ▲1.3356.59 ▲5.08
Posts /wp-admin/edit.php4.69 ▲1.3362.35 ▲15.36
Add New Post /wp-admin/post-new.php7.40 ▲1.5295.42 ▲6.35
Media Library /wp-admin/upload.php4.56 ▲1.3347.41 ▲13.13
Add New /wp-admin/post-new.php?post_type=formello_form7.3992.86
Entries /wp-admin/edit.php?post_type=formello_form&page=formello-submissions4.4341.36
Entry /wp-admin/edit.php?post_type=formello_form&page=formello-submission4.4742.33
Settings /wp-admin/admin.php?page=formello-settings4.4845.32
Forms /wp-admin/edit.php?post_type=formello_form4.6045.17
Entries /wp-admin/edit.php?post_type=formello_form&page=formello4.4742.22
Addons /wp-admin/edit.php?post_type=formello_form&page=formello-addons4.4842.76

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 292 new files
Database: 2 new tables, 8 new options
New tables
wp_formello_submissions_meta
wp_formello_submissions
New WordPress options
formello_version
formello_installed
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Contact form builder for Gutenberg - Formello
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12914.45 ▲0.061.89 ▼0.2243.97 ▼7.14
Dashboard /wp-admin2,269 ▲784.86 ▲0.02108.92 ▼7.5338.82 ▼4.53
Posts /wp-admin/edit.php2,152 ▲662.05 ▲0.0239.98 ▲3.9635.54 ▲0.81
Add New Post /wp-admin/post-new.php6,412 ▲4,87928.44 ▲5.25865.20 ▲172.8852.96 ▼19.63
Media Library /wp-admin/upload.php1,454 ▲694.19 ▲0.0094.66 ▼19.5441.12 ▼5.39
Add New /wp-admin/post-new.php?post_type=formello_form1,54117.24867.0432.22
Entries /wp-admin/edit.php?post_type=formello_form&page=formello-submissions8881.7325.5228.04
Entry /wp-admin/edit.php?post_type=formello_form&page=formello-submission9649.3385.0722.58
Settings /wp-admin/admin.php?page=formello-settings1,07710.0782.2932.95
Forms /wp-admin/edit.php?post_type=formello_form1,1241.9332.2025.51
Tools /wp-admin/admin.php?page=formello-settings#/tools1,0539.9880.6132.70
Entries /wp-admin/edit.php?post_type=formello_form&page=formello1,0422.0826.1826.13
Tools /wp-admin/edit.php?post_type=formello_form&page=formello-settings#/tools1,0699.7878.6932.76
Addons /wp-admin/edit.php?post_type=formello_form&page=formello-addons1,38712.4092.4753.56
Settings /wp-admin/edit.php?post_type=formello_form&page=formello-settings#/1,07510.0880.1732.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/formello/vendor/composer/ClassLoader.php+582
    include(wp-content/plugins/formello/vendor/composer/../appsero/client/src/License.php): failed to open stream: No such file or directory
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_formello_submissions_meta
    • wp_formello_submissions
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • formello_version
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • widget_recent-comments
    • formello_installed

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=formello_form&page=formello-submissions
    • > Notice in wp-content/plugins/formello/includes/Admin/Tables/Submissions.php+457
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/edit.php?post_type=formello_form&page=formello-submissions
    • > Warning in wp-content/plugins/formello/includes/Admin/Tables/Submissions.php+457
    array_keys() expects parameter 1 to be array, null given
    • > GET request to /wp-admin/edit.php?post_type=formello_form&page=formello-submissions
    • > Warning in wp-content/plugins/formello/includes/Admin/Tables/Submissions.php+457
    array_merge(): Expected parameter 1 to be an array, null given
    • > GET request to /wp-admin/edit.php?post_type=formello_form&page=formello-submissions
    • > Notice in wp-content/plugins/formello/includes/Admin/Admin.php+347
    Undefined variable: id

SRP 50% 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
  • 68× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/formello/vendor/rakit/validation/src/Rules/Min.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/formello/vendor/rakit/validation/src/Rules/Different.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/formello/vendor/rakit/validation/src/Rules/Boolean.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/formello/vendor/rakit/validation/src/Rules/Regex.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/formello/vendor/rakit/validation/src/Rules/Defaults.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/formello/vendor/rakit/validation/src/Rules/Same.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/formello/vendor/rakit/validation/src/Rules/Callback.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Posts_Controller' not found in wp-content/plugins/formello/includes/Rest/Controllers/Forms.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/formello/includes/Admin/Tables/Submissions.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/formello/vendor/psr/log/Psr/Log/NullLogger.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=formello_form&page=formello-submissions
    • > Intervention (severe) in unknown
    /wp-admin/post-new.php?post_type=formello_form - Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808
    • > GET request to /wp-admin/edit.php?post_type=formello_form&page=formello-submission
    • > Network (severe)
    index.php/wp-json/formello/v1/submission?_locale=user - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=formello_form&page=formello-addons
    • > Network (severe)
    index.php/wp-json/wp/v2/plugins/popper/popper?context=edit&_locale=user - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please describe screenshot #7 in formello/assets to your readme.txt
  • Tags: Too many tags (24 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

formello/formello.php Passed 13 tests

"Contact form builder for Gutenberg - Formello" version 2.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
111 characters long description:
Lightweight Gutenberg contact form builder, blazingly fast with no external dependencies and ReCaptcha support.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin13,830 lines of code in 242 files:
LanguageFilesBlank linesComment linesLines of code
PHP1372,4645,44710,246
Markdown554101,274
JSON40001,187
SVG48228709
PO File1165220334
YAML16032
XML23428
JavaScript50217
CSS3003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.99
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces21
Interfaces4
Traits8
Classes104
▷ Abstract classes43.85%
▷ Concrete classes10096.15%
▷ Final classes22.00%
Methods696
▷ Static methods527.47%
▷ Public methods56380.89%
▷ Protected methods527.47%
▷ Private methods8111.64%
Functions30
▷ Named functions2170.00%
▷ Anonymous functions930.00%
Constants20
▷ Global constants1260.00%
▷ Class constants840.00%
▷ Public constants8100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
45 PNG files occupy 0.70MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/addons/calculator.png11.44KB4.86KB▼ 57.52%
assets/addon_images/sendinblue-772x250.png17.71KB7.86KB▼ 55.62%
assets/addon_images/inserter-772x250.png18.62KB7.98KB▼ 57.13%
build/images/web-hooks.2165e998.png21.55KB9.12KB▼ 57.69%
build/images/getresponse.d51c0d3c.png9.23KB4.76KB▼ 48.41%