10% orderstorm-wordpress-e-commerce

Code Review | OrderStorm WordPress e-Commerce

WordPress plugin OrderStorm WordPress e-Commerce scored10%from 54 tests.

About plugin

  • Plugin page: orderstorm-wordpr...
  • Plugin version: 1.0.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Aug 10, 2011
  • Latest release: Apr 7, 2016
  • Number of updates: 227
  • Update frequency: every 7.5 days
  • Top authors: carlosman (68.28%)OrderStorm (32.16%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /14,538 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/orderstorm-wordpress-e-commerce/CLASS_OrderStormECommerceNgCategoriesMenuWidget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; orderstorm_ecommerce_ng_categories_menu has a deprecated constructor

Server metrics [RAM: ▲0.13MB] [CPU: ▲134.86ms] 75% from 4 tests

A check of server-side resources used by OrderStorm WordPress e-Commerce
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 641.27ms on /wp-admin/admin.php?page=orderstorm_ecommerce_settings_menu)
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.08560.42 ▲516.86
Dashboard /wp-admin3.44 ▲0.1456.92 ▲8.42
Posts /wp-admin/edit.php3.52 ▲0.1752.78 ▲8.82
Add New Post /wp-admin/post-new.php6.04 ▲0.1590.60 ▲5.35
Media Library /wp-admin/upload.php3.36 ▲0.142,362.30 ▲2,328.14
Product Categories /wp-admin/admin.php?page=orderstorm_ecommerce_product_categories_menu_option3.33407.50
Products /wp-admin/admin.php?page=orderstorm_ecommerce_products_menu_option3.33406.87
Advanced /wp-admin/admin.php?page=orderstorm_ecommerce_advanced_settings_menu_option3.32417.58
Main /wp-admin/admin.php?page=orderstorm_ecommerce_settings_menu3.32641.27

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 104 new files
Database: no new tables, 18 new options
New WordPress options
orderstorm_ecommerce_do_not_verify_ssl_peer_certificate
orderstorm_ecommerce_host_name
orderstorm_ecommerce_product_category_page_id
widget_recent-comments
widget_orderstorm_ecommerce_ng_categories_menu
widget_recent-posts
orderstorm_ecommerce_key_guid
widget_orderstorm_ecommerce_categories_menu
widget_orderstorm_ecommerce_ng_automotive_applications
orderstorm_ecommerce_product_page_id
...

Browser metrics Passed 4 tests

Checking browser requirements for OrderStorm WordPress e-Commerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,657 ▲92220.38 ▲5.7976.35 ▲74.5644.42 ▼7.60
Dashboard /wp-admin2,254 ▲634.89 ▼1.01113.43 ▼5.8243.58 ▼12.75
Posts /wp-admin/edit.php2,137 ▲482.04 ▲0.0536.25 ▼1.0431.98 ▼2.63
Add New Post /wp-admin/post-new.php1,554 ▲1221.19 ▲2.86652.49 ▲61.8536.79 ▼15.37
Media Library /wp-admin/upload.php1,436 ▲484.17 ▲0.0092.53 ▼4.8747.43 ▲5.54
Product Categories /wp-admin/admin.php?page=orderstorm_ecommerce_product_categories_menu_option9441.8426.6143.86
Products /wp-admin/admin.php?page=orderstorm_ecommerce_products_menu_option9411.7123.4530.66
Advanced /wp-admin/admin.php?page=orderstorm_ecommerce_advanced_settings_menu_option9681.8422.6921.92
Main /wp-admin/admin.php?page=orderstorm_ecommerce_settings_menu1,0031.8523.6229.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function unregister_setting was called with an argument that is deprecated since version 4.7.0! $sanitize_callback is deprecated. The callback from register_setting() is used instead.
  • The uninstall procedure has failed, leaving 18 options in the database
    • orderstorm_ecommerce_product_category_page_id
    • orderstorm_ecommerce_cart_info_for_plugin
    • orderstorm_ecommerce_cart_info_for_plugin_updated
    • widget_orderstorm_ecommerce_ng_automotive_applications
    • orderstorm_ecommerce_host_name
    • orderstorm_ecommerce_key_guid
    • widget_recent-posts
    • orderstorm_ecommerce_product_page_id
    • widget_theysaidso_widget
    • 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)
Good news, no errors were detected

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
The following issues need your attention
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_role() in wp-content/plugins/orderstorm-wordpress-e-commerce/orderstorm-ecommerce.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orderstorm-wordpress-e-commerce/CLASS_OrderStormECommerceNgCategoriesMenuWidget.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orderstorm-wordpress-e-commerce/CLASS_OrderStormECommerceCategoriesMenu.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function orderstorm_ecommerce() in wp-content/plugins/orderstorm-wordpress-e-commerce/templates/render_product_details.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orderstorm-wordpress-e-commerce/CLASS_OrderStormECommerceNgAutomotiveApplicationsWidget.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orderstorm-wordpress-e-commerce/CLASS_OrderStormECommerceShoppingCartStatusWidget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function orderstorm_ecommerce() in wp-content/plugins/orderstorm-wordpress-e-commerce/templates/category_page.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/orderstorm-wordpress-e-commerce/OrderStormEcommerceLocalization.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function orderstorm_ecommerce() in wp-content/plugins/orderstorm-wordpress-e-commerce/templates/render_product_details_custom_1.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid URI found ("www.orderstorm.com/wordpress-e-commerce-sign-up/ecommerce-wordpress-plugin-pricing/")
The official readme.txt is a good inspiration

orderstorm-wordpress-e-commerce/orderstorm-ecommerce.php 85% from 13 tests

The principal PHP file in "OrderStorm WordPress e-Commerce" v. 1.0.17 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 374 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("orderstorm-wordpress-e-commerce.php" instead of "orderstorm-ecommerce.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin16,528 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP128811969,530
JavaScript193967574,841
CSS142731081,749
HTML8119408

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,062)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 551)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity155.12
▷ Minimum class complexity2.00
▷ Maximum class complexity1,062.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity551.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods235
▷ Static methods187.66%
▷ Public methods20285.96%
▷ Protected methods00.00%
▷ Private methods3314.04%
Functions58
▷ Named functions58100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.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
43 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/fancybox/fancy_shadow_ne.png0.34KB0.48KB0.00%
images/menu_center_black.png2.86KB0.27KB▼ 90.43%
js/jquery-context-menu/images/page_white_copy.png0.30KB0.34KB0.00%
js/fancybox/fancy_shadow_se.png0.34KB0.48KB0.00%
images/menu_bottom_black.png3.02KB0.64KB▼ 78.74%