84% product-base-order-for-woocommerce

Code Review | Product Base Order for WooCommerce

WordPress plugin Product Base Order for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: product-base-orde...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2021
  • Latest release: Jun 4, 2021
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: wprealizer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /301 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: ▲0.35MB] [CPU: ▼2.23ms] Passed 4 tests

Server-side resources used by Product Base Order for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1845.36 ▲6.52
Dashboard /wp-admin3.74 ▲0.4447.22 ▼1.15
Posts /wp-admin/edit.php3.79 ▲0.4449.51 ▲2.36
Add New Post /wp-admin/post-new.php6.28 ▲0.4094.48 ▼11.83
Media Library /wp-admin/upload.php3.60 ▲0.3836.94 ▲1.69

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
wpr_pbowc_admin_settings_product_page
widget_recent-posts
db_upgraded
wpr_pbowc_admin_settings_general
wpr_pbowc_admin_settings_shortcodes
wpr_pbowc_admin_settings_help
theysaidso_admin_options

Browser metrics Passed 4 tests

Product Base Order for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲17714.00 ▼0.2712.30 ▲10.3741.24 ▼2.92
Dashboard /wp-admin2,230 ▲514.91 ▼0.94110.33 ▲9.5441.20 ▼7.53
Posts /wp-admin/edit.php2,115 ▲262.04 ▲0.0136.35 ▼1.9835.47 ▼2.83
Add New Post /wp-admin/post-new.php1,536 ▲122.99 ▼0.22618.36 ▲22.5257.10 ▲4.60
Media Library /wp-admin/upload.php1,415 ▲244.24 ▲0.0597.17 ▼5.7741.78 ▼2.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 10 options in the database
    • wpr_pbowc_admin_settings_general
    • widget_recent-posts
    • wpr_pbowc_admin_settings_product_page
    • widget_theysaidso_widget
    • wpr_pbowc_admin_settings_help
    • wpr_pbowc_admin_settings_shortcodes
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: get_orders in wp-content/plugins/product-base-order-for-woocommerce/templates/global-orders-list.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/product-base-order-for-woocommerce/templates/global-orders-list.php:197
    • > PHP Notice
      Undefined variable: filter_option in wp-content/plugins/product-base-order-for-woocommerce/templates/global-orders-list.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: woocommerce, order, product, product-base-order

product-base-order-for-woocommerce/product-base-order-for-woocommerce.php 92% from 13 tests

The entry point to "Product Base Order for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected8,535 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,9927,0086,444
PHP173308351,587
CSS3337503
JSON1001

PHP code Passed 2 tests

This is a short overview 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.45
Average class complexity16.09
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods82
▷ Static methods44.88%
▷ Public methods7996.34%
▷ Protected methods00.00%
▷ Private methods33.66%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin