10% orderstorm-e-commerce

Code Review | OrderStorm E-commerce

WordPress plugin OrderStorm E-commerce scored10%from 54 tests.

About plugin

  • Plugin page: orderstorm-e-comm...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Jun 9, 2016
  • Latest release: Jan 17, 2017
  • Number of updates: 28
  • Update frequency: every 7.9 days
  • Top authors: OrderStorm (78.57%)carlosman (25%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,328 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/orderstorm-e-commerce/CLASS_OrderStormECommerceForWordPress.php+615
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.92MB] [CPU: ▲13.17ms] Passed 4 tests

A check of server-side resources used by OrderStorm E-commerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.72 ▼32.27
Dashboard /wp-admin2.09 ▼1.228.89 ▼40.87
Posts /wp-admin/edit.php2.09 ▼1.266.18 ▼42.68
Add New Post /wp-admin/post-new.php2.09 ▼3.80264.93 ▲168.49
Media Library /wp-admin/upload.php2.09 ▼1.143,868.06 ▲3,830.50
Advanced /wp-admin/admin.php?page=orderstorm_ecommerce_advanced_settings_menu_option2.09229.31
Products /wp-admin/admin.php?page=orderstorm_ecommerce_products_menu_option2.097.01
Product Categories /wp-admin/admin.php?page=orderstorm_ecommerce_product_categories_menu_option2.096.10
Main /wp-admin/admin.php?page=orderstorm_ecommerce_settings_menu2.097.01

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 19 new options
New WordPress options
orderstorm_ecommerce_cart_info_for_plugin_updated
orderstorm_ecommerce_checkout_page_id
orderstorm_ecommerce_do_not_verify_ssl_peer_certificate
orderstorm_ecommerce_product_page_id
widget_recent-posts
can_compress_scripts
orderstorm_ecommerce_host_name
orderstorm_ecommerce_product_category_page_id
db_upgraded
theysaidso_admin_options
...

Browser metrics Passed 4 tests

A check of browser resources used by OrderStorm E-commerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,480 ▲71920.42 ▲6.1583.03 ▲81.3139.70 ▼0.31
Dashboard /wp-admin2,237 ▲565.56 ▼0.1981.09 ▼24.9639.31 ▼5.95
Posts /wp-admin/edit.php2,139 ▲391.98 ▲0.0433.23 ▼4.1235.49 ▲1.46
Add New Post /wp-admin/post-new.php1,569 ▲4123.75 ▲0.74619.53 ▼66.5665.98 ▲8.60
Media Library /wp-admin/upload.php1,439 ▲394.25 ▲0.0597.53 ▼2.6844.48 ▲0.11
Advanced /wp-admin/admin.php?page=orderstorm_ecommerce_advanced_settings_menu_option9712.0222.7623.86
Products /wp-admin/admin.php?page=orderstorm_ecommerce_products_menu_option9542.0423.5554.82
Product Categories /wp-admin/admin.php?page=orderstorm_ecommerce_product_categories_menu_option9542.0424.5032.69
Main /wp-admin/admin.php?page=orderstorm_ecommerce_settings_menu2,5491.8222.6930.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/orderstorm-e-commerce/CLASS_OrderStormECommerceForWordPress.php+615
    count(): Parameter must be an array or an object that implements Countable
  • Zombie WordPress options detected upon uninstall: 19 options
    • orderstorm_ecommerce_product_category_page_id
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • orderstorm_ecommerce_key_guid
    • widget_orderstorm_ecommerce_ng_categories_menu
    • orderstorm_ecommerce_do_not_verify_ssl_peer_certificate
    • widget_orderstorm_ecommerce_shopping_cart_status
    • orderstorm_ecommerce_cart_info_for_plugin_updated
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=orderstorm_ecommerce_settings_menu
    • > Warning in wp-content/plugins/orderstorm-e-commerce/CLASS_OrderStormECommerceForWordPress.php+615
    count(): Parameter must be an array or an object that implements Countable

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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orderstorm-e-commerce/CLASS_OrderStormECommerceNgCategoriesMenuWidget.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orderstorm-e-commerce/CLASS_OrderStormECommerceShoppingCartStatusWidget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_role() in wp-content/plugins/orderstorm-e-commerce/orderstorm-ecommerce.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/orderstorm-e-commerce/CLASS_OrderStormECommerceNgAutomotiveApplicationsWidget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/orderstorm-e-commerce/OrderStormEcommerceLocalization.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: "www.orderstorm.com/wordpress-e-commerce-sign-up/ecommerce-wordpress-plugin-pricing/"
You can look at the official readme.txt

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

The main PHP script in "OrderStorm E-commerce" version 2.0.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("orderstorm-e-commerce.php" instead of "orderstorm-ecommerce.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 374 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected5,632 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP86911475,251
JavaScript34162381

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity89.14
▷ Minimum class complexity2.00
▷ Maximum class complexity475.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity99.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods179
▷ Static methods179.50%
▷ Public methods16994.41%
▷ Protected methods00.00%
▷ Private methods105.59%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants39
▷ Global constants39100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/zoomIn.png1.14KB1.09KB▼ 4.02%
images/menu_center.png2.86KB0.27KB▼ 90.43%
images/menu_center_blue.png1.02KB0.24KB▼ 76.06%
images/menu_top_blue.png3.89KB0.26KB▼ 93.34%
images/menu_bottom_black.png3.02KB0.64KB▼ 78.74%