10% step-by-step-ordering-system-for-woocommerce

Code Review | Step-By-Step Ordering System for WooCommerce

WordPress plugin Step-By-Step Ordering System for WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: step-by-step-orde...
  • Plugin version: 1.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Jul 4, 2017
  • Latest release: Oct 23, 2022
  • Number of updates: 76
  • Update frequency: every 25.6 days
  • Top authors: trevorpham (67.11%)dreambuilders (34.21%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active / 9,922 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.77ms] Passed 4 tests

An overview of server-side resources used by Step-By-Step Ordering System for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.24 ▼8.19
Dashboard /wp-admin3.31 ▲0.0146.55 ▼7.19
Posts /wp-admin/edit.php3.36 ▲0.0051.15 ▲4.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.67 ▼5.01
Media Library /wp-admin/upload.php3.23 ▲0.0035.85 ▲1.30

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 85 new files
Database: no new tables, 10 new options
New WordPress options
sbs_general
widget_recent-comments
can_compress_scripts
db_upgraded
sbs_version
sbs_navbar
widget_recent-posts
step_order
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Step-By-Step Ordering System for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.68 ▼0.694.37 ▲2.5438.14 ▼9.35
Dashboard /wp-admin2,206 ▲324.86 ▼0.02111.10 ▼3.7541.57 ▼6.38
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0039.23 ▲2.2635.65 ▼2.65
Add New Post /wp-admin/post-new.php1,535 ▲1823.41 ▲5.76629.16 ▼61.4162.17 ▲8.44
Media Library /wp-admin/upload.php1,391 ▲64.17 ▼0.0097.04 ▼7.8941.41 ▼3.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 10 options in the database
    • sbs_version
    • theysaidso_admin_options
    • sbs_general
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • sbs_navbar
    • step_order
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% 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 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
Please fix the following
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/step-by-step-ordering-system-for-woocommerce/includes/shortcodes/sbs-select-package.php:148
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/step-by-step-ordering-system-for-woocommerce/includes/plugin/activation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/step-by-step-ordering-system-for-woocommerce/woocommerce/plugin-template-override.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/step-by-step-ordering-system-for-woocommerce/includes/woocommerce-actions/add-to-cart-loop.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/step-by-step-ordering-system-for-woocommerce/includes/themes/common-theme-styles-dequeue.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/step-by-step-ordering-system-for-woocommerce/includes/themes/common-theme-styles.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/step-by-step-ordering-system-for-woocommerce/includes/themes/theme-selector.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/step-by-step-ordering-system-for-woocommerce/includes/themes/main-style.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
5 plugin tags: ordering, e-commerce, step-by-step, woocommerce, shopping

step-by-step-ordering-system-for-woocommerce/wc-step-by-step-ordering.php 77% from 13 tests

The main PHP file in "Step-By-Step Ordering System for WooCommerce" ver. 1.3.9 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "3.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("step-by-step-ordering-system-for-woocommerce.php" instead of "wc-step-by-step-ordering.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
There were no executable files found in this plugin7,640 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP219064813,505
CSS213054113,385
JavaScript13129125750

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity16.00
▷ Minimum class complexity9.00
▷ Maximum class complexity23.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods17
▷ Static methods00.00%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions109
▷ Named functions10293.58%
▷ Anonymous functions76.42%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
15 PNG files occupy 0.22MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/nav-num-shapes/heart.png9.33KB4.52KB▼ 51.50%
assets/admin/side-banner.png104.10KB42.13KB▼ 59.53%
assets/admin/nav-num-shapes/default.png8.88KB3.45KB▼ 61.16%
assets/admin/nav-num-shapes/twelve-star.png9.94KB4.51KB▼ 54.61%
assets/admin/nav-step-shapes/tv-screen.png10.20KB5.27KB▼ 48.37%