72% sequential-order-numbers-for-woocommerce

Code Review | Sequential Order Numbers for WooCommerce

WordPress plugin Sequential Order Numbers for WooCommerce scored 72% from 54 tests.

About plugin

  • Plugin page: sequential-order-...
  • Plugin version: 3.5.7.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2018
  • Latest release: Sep 21, 2023
  • Number of updates: 50
  • Update frequency: every 39.7 days
  • Top authors: RazyRx (82%)dholovnia (20%)

Code review

54 tests

User reviews

13 reviews

Install metrics

900+ active / 14,425 total downloads

Benchmarks

Plugin footprint 83% 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.68MB] [CPU: ▲12.78ms] Passed 4 tests

This is a short check of server-side resources used by Sequential Order Numbers for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.16 ▲1.7050.02 ▲14.15
Dashboard /wp-admin5.09 ▲1.7958.20 ▲13.00
Posts /wp-admin/edit.php4.87 ▲1.5149.28 ▲2.24
Add New Post /wp-admin/post-new.php7.62 ▲1.73122.13 ▲25.84
Media Library /wp-admin/upload.php5.02 ▲1.7958.74 ▲21.72
Order Numbers /wp-admin/edit.php?post_type=br_order_numbers4.8745.19

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 82 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
recovery_mode_email_last_sent
widget_theysaidso_widget
berocket_admin_notices_rate_stars
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
br-BeRocket_Order_Numbers-options

Browser metrics Passed 4 tests

Sequential Order Numbers for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.69 ▼0.711.95 ▼0.0642.30 ▼0.79
Dashboard /wp-admin2,226 ▲384.91 ▼1.00100.44 ▼11.7281.95 ▲35.16
Posts /wp-admin/edit.php45 ▼2,0440.44 ▼1.590.10 ▼38.2711.49 ▼17.19
Add New Post /wp-admin/post-new.php1,545 ▼017.69 ▼5.49688.89 ▲50.3253.01 ▼9.56
Media Library /wp-admin/upload.php1,423 ▲354.21 ▲0.04101.12 ▼2.6777.84 ▲33.91
Order Numbers /wp-admin/edit.php?post_type=br_order_numbers450.440.078.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • br-BeRocket_Order_Numbers-options
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • berocket_admin_notices_rate_stars

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
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=br_order_numbers
    • > Error in wp-content/plugins/sequential-order-numbers-for-woocommerce/includes/paid.php+259
    Uncaught Error: Call to undefined function wc_get_order_types() in wp-content/plugins/sequential-order-numbers-for-woocommerce/includes/paid.php:259
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): BeRocket_Order_Numbers_Paid->request_query()
    #1 wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #2 wp-includes/class-wp.php(389): apply_filters()
    #3 wp-includes/class-wp.php(779): WP->parse_request()
    #4 wp-includes/functions.php(1335): WP->main()
    #5 wp-admin/includes/post.php(1283): wp()
    #6 wp-admin/includes/class-wp-posts-list-table.php(165): wp_edit_posts_query()
    #7 wp-admin/edit.php(235): WP_Posts_List_Table->prepare_items()
    #8 {main}
    thrown

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
The following issues need your attention
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/sequential-order-numbers-for-woocommerce/berocket/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sequential-order-numbers-for-woocommerce/sequential-order-numbers.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/sequential-order-numbers-for-woocommerce/berocket/includes/settings_fields.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sequential-order-numbers-for-woocommerce/berocket/includes/error_notices.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sequential-order-numbers-for-woocommerce/berocket/framework.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sequential-order-numbers-for-woocommerce/berocket/templates/premium.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sequential-order-numbers-for-woocommerce/berocket/libraries/tippy.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sequential-order-numbers-for-woocommerce/berocket/libraries/wpml_compatibility.php:2
    • > PHP Notice
      Undefined variable: framework_version in wp-content/plugins/sequential-order-numbers-for-woocommerce/berocket/framework_version.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sequential-order-numbers-for-woocommerce/berocket/includes/updater.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=br_order_numbers
    • > Network (severe)
    wp-admin/edit.php?post_type=br_order_numbers - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

sequential-order-numbers-for-woocommerce/sequential-order-numbers.php 85% from 13 tests

The main PHP script in "Sequential Order Numbers for WooCommerce" version 3.5.7.8 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("sequential-order-numbers-for-woocommerce.php" instead of "sequential-order-numbers.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 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 plugin20,863 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
CSS132,512769,416
PHP364741,0069,239
JavaScript543581,747
PO File3204232461

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity50.82
▷ Minimum class complexity1.00
▷ Maximum class complexity240.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods420
▷ Static methods15837.62%
▷ Public methods420100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
berocket/libraries/addons/default.png3.87KB2.63KB▼ 31.94%
berocket/assets/css/mail.png2.59KB1.92KB▼ 26.02%
berocket/includes/ico.png1.90KB1.41KB▼ 25.89%
berocket/assets/images/submenu-icon.png0.62KB0.50KB▼ 20.13%
berocket/libraries/templates/default.png3.87KB2.63KB▼ 31.94%