78% wt-woocommerce-sequential-order-numbers

Code Review | Sequential Order Number for WooCommerce

WordPress plugin Sequential Order Number for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: wt-woocommerce-se...
  • Plugin version: 1.5.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2018
  • Latest release: Nov 16, 2023
  • Number of updates: 87
  • Update frequency: every 23.4 days
  • Top authors: webtoffee (81.61%)markhf (19.54%)

Code review

54 tests

User reviews

105 reviews

Install metrics

30,000+ active /312,360 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.50ms] Passed 4 tests

Analyzing server-side resources used by Sequential Order Number for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.32 ▲3.84
Dashboard /wp-admin3.46 ▲0.1257.14 ▼7.04
Posts /wp-admin/edit.php3.58 ▲0.2247.00 ▼2.86
Add New Post /wp-admin/post-new.php6.05 ▲0.1683.77 ▼5.46
Media Library /wp-admin/upload.php3.39 ▲0.1633.78 ▲1.37

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 87 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
wt_seq_basic_installation_date
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Sequential Order Number for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5414.40 ▲0.091.70 ▼0.1547.08 ▼1.48
Dashboard /wp-admin2,206 ▲295.61 ▼0.0487.84 ▼10.6641.08 ▼5.49
Posts /wp-admin/edit.php2,112 ▲122.03 ▲0.0235.47 ▼3.3833.93 ▼0.35
Add New Post /wp-admin/post-new.php1,538 ▲1223.11 ▲0.07672.33 ▲38.0256.84 ▲2.17
Media Library /wp-admin/upload.php1,414 ▲204.17 ▲0.0198.46 ▼9.7342.86 ▼2.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • wt_seq_basic_installation_date
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wt-woocommerce-sequential-order-numbers/public/partials/wt-advanced-order-number-public-display.php
    • > /wp-content/plugins/wt-woocommerce-sequential-order-numbers/admin/partials/wt-advanced-order-number-admin-display.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wt-woocommerce-sequential-order-numbers/admin/views/wt-advanced-order-number-admin-settings-page.php:2
    • > PHP Warning
      Use of undefined constant WT_SEQUENCIAL_ORDNUMBER_URL - assumed 'WT_SEQUENCIAL_ORDNUMBER_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wt-woocommerce-sequential-order-numbers/admin/views/wt-goto-pro.php on line 2
    • > PHP Warning
      Use of undefined constant WT_SEQUENCIAL_ORDNUMBER_URL - assumed 'WT_SEQUENCIAL_ORDNUMBER_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wt-woocommerce-sequential-order-numbers/admin/views/wt-goto-pro.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wt-woocommerce-sequential-order-numbers/admin/views/wt-bottom-banner.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wt-woocommerce-sequential-order-numbers/admin/views/wt-goto-pro.php:71

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

wt-woocommerce-sequential-order-numbers/wt-advanced-order-number.php 85% from 13 tests

Analyzing the main PHP file in "Sequential Order Number for WooCommerce" version 1.5.7
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "2.1.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wt-woocommerce-sequential-order-numbers.php" instead of "wt-advanced-order-number.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected4,247 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP253395303,821
JavaScript319141350
SVG70076
CSS2080

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.71
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods90
▷ Static methods2527.78%
▷ Public methods8190.00%
▷ Protected methods00.00%
▷ Private methods910.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants4
▷ Global constants4100.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
38 PNG files occupy 0.43MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/other_solutions/wt_sdd_logo.png4.71KB2.67KB▼ 43.28%
admin/images/other_solutions/fbt_plugin.png3.35KB3.33KB▼ 0.73%
assets/images/tick_icon_yellow.png6.57KB0.32KB▼ 95.14%
admin/images/other_solutions/pdf-invoice-plugin.png18.78KB18.56KB▼ 1.13%
assets/images/seq_support.png1.40KB0.85KB▼ 39.48%