67% bigcommerce

Code Review | BigCommerce For WordPress

WordPress plugin BigCommerce For WordPress scored67%from 54 tests.

About plugin

  • Plugin page: bigcommerce
  • Plugin version: 5.0.6
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2018
  • Latest release: Nov 13, 2023
  • Number of updates: 190
  • Update frequency: every 9.6 days
  • Top authors: bigcommerce (100%)

Code review

54 tests

User reviews

42 reviews

Install metrics

900+ active /102,315 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲10.64MB] [CPU: ▲64.41ms] 75% from 4 tests

A check of server-side resources used by BigCommerce For WordPress
Please fix the following
  • Extra RAM: Extra memory usage should kept under 5MB (currently 10.64MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /13.24 ▲9.7795.94 ▲56.00
Dashboard /wp-admin14.65 ▲11.34109.44 ▲57.67
Posts /wp-admin/edit.php13.90 ▲10.54122.29 ▲76.80
Add New Post /wp-admin/post-new.php16.81 ▲10.91164.35 ▲67.16
Media Library /wp-admin/upload.php14.65 ▲11.42139.67 ▲105.60

Server storage [IO: ▲17.60MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 1,885 new files
Database: 1 new table, 23 new options
New tables
wp_bc_queue
New WordPress options
bigcommerce_orders_page_id
db_upgraded
bigcommerce_gift_balance_page_id
schema-BigCommerce\Schema\Queue_Table
bigcommerce_checkout_complete_page_id
bigcommerce_account_page_id
widget_recent-comments
bigcommerce_address_page_id
bigcommerce_flushed_rewrites
schema-BigCommerce\Schema\User_Roles
...

Browser metrics Passed 4 tests

Checking browser requirements for BigCommerce For WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,546 ▼24114.88 ▲0.640.56 ▼1.5016.47 ▼29.26
Dashboard /wp-admin2,290 ▲1136.66 ▲1.05132.32 ▲41.0546.02 ▲4.14
Posts /wp-admin/edit.php2,206 ▲1063.95 ▲1.9662.77 ▲26.1836.48 ▲2.14
Add New Post /wp-admin/post-new.php1,712 ▲18627.03 ▲3.91734.37 ▲51.6047.32 ▼29.87
Media Library /wp-admin/upload.php1,533 ▲1365.04 ▲0.86100.35 ▲1.9248.14 ▲3.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_bc_queue
  • Zombie WordPress options detected upon uninstall: 11 options
    • bigcommerce_checkout_complete_page_id
    • widget_theysaidso_widget
    • widget_bigcommerce_product_categories
    • schema-BigCommerce\Schema\Queue_Table
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_bigcommerce_mini_cart
    • widget_bigcommerce_currency_switcher
    • db_upgraded
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 28× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/bigcommerce/templates/public/archive-bigcommerce_product.php
    • > /wp-content/plugins/bigcommerce/templates/public/components/reviews/review-list-pagination.php
    • > /wp-content/plugins/bigcommerce/templates/public/amp/components/cart/cart.php
    • > /wp-content/plugins/bigcommerce/templates/public/components/wishlist/detail.php
    • > /wp-content/plugins/bigcommerce/templates/public/components/gift-certificates/purchase-shortcode.php
    • > /wp-content/plugins/bigcommerce/templates/public/components/products/product-shortcode-pagination.php
    • > /wp-content/plugins/bigcommerce/templates/public/amp/archive-bigcommerce_product.php
    • > /wp-content/plugins/bigcommerce/templates/public/components/products/related-product-card.php
    • > /wp-content/plugins/bigcommerce/templates/public/components/gift-certificates/balance-shortcode.php
    • > /wp-content/plugins/bigcommerce/templates/public/components/orders/orders-shortcode-pagination.php
  • 938× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bigcommerce/templates/public/components/option-types/option-product-list-with-images.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'BigCommerce\\Api\\v3\\Model\\VariantBase' not found in wp-content/plugins/bigcommerce/vendor/moderntribe/bigcommerce-api-php-v3/src/Model/VariantPut.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'BigCommerce\\Api\\v3\\Model\\OptionBase' not found in wp-content/plugins/bigcommerce/vendor/moderntribe/bigcommerce-api-php-v3/src/Model/Option.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'BigCommerce\\Templates\\Controller' not found in wp-content/plugins/bigcommerce/src/BigCommerce/Templates/Option_Types/Option_Type.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/bigcommerce/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bigcommerce/templates/public/components/orders/order-details.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/bigcommerce/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php:21
    • > PHP Notice
      Undefined variable: tracking_number in wp-content/plugins/bigcommerce/templates/public/components/orders/order-shipment.php on line 30
    • > PHP Fatal error
      Uncaught Error: Interface 'BigCommerce\\Shortcodes\\Shortcode' not found in wp-content/plugins/bigcommerce/src/BigCommerce/Shortcodes/Login_Form.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'BigCommerce\\Settings\\Sections\\Settings_Section' not found in wp-content/plugins/bigcommerce/src/BigCommerce/Settings/Sections/Gift_Certificates.php:10

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
You can take inspiration from this readme.txt

bigcommerce/bigcommerce.php 92% from 13 tests

The main PHP file in "BigCommerce For WordPress" ver. 5.0.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 213 characters long)

Code Analysis 97% 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 plugin188,995 lines of code in 1,672 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,37133,74271,468135,564
CSS1312885218,093
YAML12681312,521
JavaScript1913,9883,67512,517
Markdown301,10103,654
HTML121222,685
Mustache510901,133
JSON17001,065
C118847879
Sass270273
SVG604142
C/C++ Header24046132
reStructuredText19413597
XML45079
Bourne Shell225865
GraphQL21055
m41111141

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,155)
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.03
▷ Minimum class complexity1.00
▷ Maximum class complexity1,155.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces112
Interfaces20
Traits13
Classes1,162
▷ Abstract classes342.93%
▷ Concrete classes1,12897.07%
▷ Final classes20.18%
Methods12,142
▷ Static methods1,41711.67%
▷ Public methods10,54186.81%
▷ Protected methods7796.42%
▷ Private methods8226.77%
Functions1,081
▷ Named functions615.64%
▷ Anonymous functions1,02094.36%
Constants2,254
▷ Global constants100.44%
▷ Class constants2,24499.56%
▷ Public constants2,244100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 PNG files occupy 0.29MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/test/__coverage__/lcov-report/sort-arrow-sprite.png0.20KB0.14KB▼ 29.67%
assets/img/admin/Gutenberg-Block_Wishlist.png46.61KB17.13KB▼ 63.26%
assets/img/admin/Gutenberg-Block_Gift-Cert-Form.png16.69KB8.03KB▼ 51.91%
assets/img/admin/bigcommerce-resource-thumbnail-2x.png7.02KB3.53KB▼ 49.64%
assets/img/admin/Gutenberg-Block_Cart.png27.36KB12.12KB▼ 55.69%