78% custom-order-number-woo

Code Review | custom order number woo

WordPress plugin custom order number woo scored78%from 54 tests.

About plugin

  • Plugin page: custom-order-numb...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 26, 2016
  • Latest release: Sep 28, 2016
  • Number of updates: 11
  • Update frequency: every 0.3 days
  • Top authors: joydipme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,134 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.66MB] [CPU: ▼18.39ms] Passed 4 tests

Server-side resources used by custom order number woo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.57 ▼8.53
Dashboard /wp-admin3.34 ▲0.0350.96 ▼4.59
Posts /wp-admin/edit.php3.39 ▲0.0352.80 ▲3.16
Add New Post /wp-admin/post-new.php3.17 ▼2.7240.65 ▼61.75
Media Library /wp-admin/upload.php3.26 ▲0.0338.48 ▲1.32
custom order number /wp-admin/options-general.php?page=woo_commerce_custom_order_number3.2230.81

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

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

Browser metrics Passed 4 tests

custom order number woo: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.271.68 ▼0.0340.85 ▼3.05
Dashboard /wp-admin2,199 ▲225.64 ▲0.0292.93 ▲0.3237.80 ▼6.21
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0339.90 ▲2.7834.99 ▼2.02
Add New Post /wp-admin/post-new.php1,529 ▲323.03 ▼0.02663.31 ▼43.7060.48 ▲9.17
Media Library /wp-admin/upload.php1,404 ▲74.20 ▼0.0195.91 ▼9.2343.28 ▼3.59
custom order number /wp-admin/options-general.php?page=woo_commerce_custom_order_number6971.127.6618.37

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=woo_commerce_custom_order_number
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/custom-order-number-woo/templates/settings.php on line 5 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/custom-order-number-woo/templates/settings.php(5): do_settings_fields()
    #1 wp-content/plugins/custom-order-number-woo/woocommerce-custom-order-settings.php(54): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): woo_commerce_custom_order_number->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/custom-order-number-woo/templates/settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
  • Tested up to: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

custom-order-number-woo/woocommerce-custom-order-settings.php 92% from 13 tests

The main file in "custom order number woo" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-order-number-woo.php" instead of "woocommerce-custom-order-settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected135 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32340135

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG images were found in this plugin