56% stylish-order-form-builder

Code Review | Stylish Order Form Builder

WordPress plugin Stylish Order Form Builder scored56%from 54 tests.

About plugin

  • Plugin page: stylish-order-for...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: May 25, 2022
  • Latest release: Jun 12, 2022
  • Number of updates: 16
  • Update frequency: every 2.4 days
  • Top authors: hayyatapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,228 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.95MB] [CPU: ▼39.89ms] Passed 4 tests

An overview of server-side resources used by Stylish Order Form Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.46 ▼4.62
Dashboard /wp-admin3.01 ▼0.3428.73 ▼38.60
Posts /wp-admin/edit.php3.01 ▼0.3527.67 ▼26.67
Add New Post /wp-admin/post-new.php3.01 ▼2.8823.95 ▼77.75
Media Library /wp-admin/upload.php3.01 ▼0.2221.64 ▼16.55
Settings /wp-admin/admin.php?page=SOFB_manage_settings3.0123.56
Go Pro /wp-admin/admin.php?page=SOFB_go_pro3.0128.44
Manage Forms /wp-admin/admin.php?page=SOFB_manage_forms3.0126.18
Stylish Order Form Builder Lite /wp-admin/admin.php?page=MAINMENUSOFB3.0125.02
Manage Orders /wp-admin/admin.php?page=SOFB_manage_orders3.0127.86
Manage products /wp-admin/admin.php?page=SOFB_add_products3.0126.93
Manage Property /wp-admin/admin.php?page=SOFB_add_property3.0127.43
How it works? /wp-admin/admin.php?page=SOFB_demo_vid3.0125.60

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 54 new files
Database: 4 new tables, 6 new options
New tables
wp_happs_SOFB_forms
wp_happs_SOFB_products
wp_happs_SOFB_orders
wp_happs_SOFB_properties
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Stylish Order Form Builder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12913.27 ▼1.081.59 ▼0.1143.56 ▲0.73
Dashboard /wp-admin2,293 ▲1195.79 ▲0.25106.25 ▲5.3239.12 ▼3.78
Posts /wp-admin/edit.php2,200 ▲972.24 ▲0.2846.08 ▲10.3432.97 ▼0.50
Add New Post /wp-admin/post-new.php1,583 ▲5523.49 ▲0.18683.93 ▲10.6938.72 ▼10.51
Media Library /wp-admin/upload.php1,500 ▲974.41 ▲0.22105.38 ▲5.8042.74 ▼2.70
Settings /wp-admin/admin.php?page=SOFB_manage_settings1,1281.9634.3652.26
Go Pro /wp-admin/admin.php?page=SOFB_go_pro1,1342.5142.6042.81
Manage Forms /wp-admin/admin.php?page=SOFB_manage_forms1,1812.0931.2742.50
Stylish Order Form Builder Lite /wp-admin/admin.php?page=MAINMENUSOFB9071.9432.2733.00
Manage Orders /wp-admin/admin.php?page=SOFB_manage_orders9341.9532.5127.89
Manage products /wp-admin/admin.php?page=SOFB_add_products5,2361.9539.7850.12
Manage Property /wp-admin/admin.php?page=SOFB_add_property1,2141.9635.1742.36
How it works? /wp-admin/admin.php?page=SOFB_demo_vid1,4199.36296.5159.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 56 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SOFB_demo_vid
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/admin.php?page=SOFB_manage_forms
    • > Notice in wp-content/plugins/stylish-order-form-builder/functions-wp.php+94
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=SOFB_manage_forms
    • > Notice in wp-content/plugins/stylish-order-form-builder/functions-wp.php+94
    Trying to access array offset on value of type null
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SOFB_add_products
    • > Notice in wp-content/plugins/stylish-order-form-builder/Pages/manage-products/add-products.php+76
    Undefined index: name

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
Please take a closer look at the following
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/stylish-order-form-builder/Pages/activation.php
    • > /wp-content/plugins/stylish-order-form-builder/Pages/settings/color-customization.php
    • > /wp-content/plugins/stylish-order-form-builder/Pages/manage-forms/includes/all-properties.php
    • > /wp-content/plugins/stylish-order-form-builder/lib/style.php
    • > /wp-content/plugins/stylish-order-form-builder/Pages/pro.php
    • > /wp-content/plugins/stylish-order-form-builder/Pages/how-it-works.php
    • > /wp-content/plugins/stylish-order-form-builder/Pages/manage-orders/view.php
  • 31× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/stylish-order-form-builder/Pages/manage-prop/settings.php:2
    • > PHP Notice
      Undefined index: form_title in wp-content/plugins/stylish-order-form-builder/Pages/manage-orders/view.php on line 38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AP_SOFB_GET_PRODUCTS() in wp-content/plugins/stylish-order-form-builder/lib/form.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AP_SOFB_GET_PRODUCTS() in wp-content/plugins/stylish-order-form-builder/Pages/manage-forms/includes/all-products.php:3
    • > PHP Notice
      Undefined index: order_data in wp-content/plugins/stylish-order-form-builder/Pages/manage-orders/view.php on line 39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AP_SOFB_GET_PROP() in wp-content/plugins/stylish-order-form-builder/Pages/manage-forms/action.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/stylish-order-form-builder/stylish-order-form-builder-lite.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AP_SOFB_GET_PROP() in wp-content/plugins/stylish-order-form-builder/Pages/manage-products/action.php:63
    • > PHP Warning
      sizeof(): Parameter must be an array or an object that implements Countable in wp-content/plugins/stylish-order-form-builder/Pages/manage-forms/includes/all-properties.php on line 4
    • > PHP Notice
      Undefined index: submission_date in wp-content/plugins/stylish-order-form-builder/Pages/manage-orders/view.php on line 37

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 fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SOFB_demo_vid
    • > Javascript (severe) in unknown
    /wp-content/plugins/stylish-order-form-builder/Pages/manage-prop/re-order-js.js?ver=1 0:937 Uncaught TypeError: $ is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SOFB_demo_vid
    • > Javascript (severe) in unknown
    /wp-content/plugins/stylish-order-form-builder/Pages/manage-products/add-product-js.js?ver=1 0:866 Uncaught TypeError: $ is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SOFB_demo_vid
    • > Javascript (severe) in unknown
    /wp-content/plugins/stylish-order-form-builder/Pages/manage-forms/forms-js.js?ver=1 0:1289 Uncaught TypeError: $ is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SOFB_demo_vid
    • > Javascript (severe) in unknown
    /wp-content/plugins/stylish-order-form-builder/Pages/pro.js?ver=1 0:30 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: order form builder, quote form builder

stylish-order-form-builder/stylish-order-form-builder-lite.php 77% from 13 tests

This is the main PHP file of "Stylish Order Form Builder" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 313 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("stylish-order-form-builder.php" instead of "stylish-order-form-builder-lite.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
Good job! No executable or dangerous file extensions detected3,157 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
CSS5154801,646
PHP31644901,467
JavaScript1110040
SVG4004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions60
▷ Named functions60100.00%
▷ Anonymous functions00.00%
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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
JS/tipx/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
JS/tipx/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%