10% wp-bigcommerce

Code Review | WP Bigcommerce

WordPress plugin WP Bigcommerce scored10%from 54 tests.

About plugin

  • Plugin page: wp-bigcommerce
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Oct 24, 2013
  • Latest release: Jan 8, 2014
  • Number of updates: 9
  • Update frequency: every 8.5 days
  • Top authors: coreymcmahon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,930 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-bigcommerce/src/WPBigcommerceServicesJson.php+156
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.78MB] [CPU: ▼50.74ms] Passed 4 tests

An overview of server-side resources used by WP Bigcommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.20 ▼1.264.61 ▼36.86
Dashboard /wp-admin2.22 ▼1.087.30 ▼44.48
Posts /wp-admin/edit.php2.22 ▼1.138.49 ▼37.62
Add New Post /wp-admin/post-new.php2.22 ▼3.666.69 ▼83.98
Media Library /wp-admin/upload.php2.22 ▼1.006.54 ▼27.79
WP Bigcommerce /wp-admin/options-general.php?page=6869637cf7937e8eb8d2f2c2039bf2b02.226.14

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Bigcommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.32 ▼1.241.75 ▼0.5038.61 ▼8.32
Dashboard /wp-admin2,210 ▲224.85 ▼1.16110.76 ▼2.6039.90 ▼4.18
Posts /wp-admin/edit.php2,096 ▲72.02 ▲0.0141.43 ▲1.8436.28 ▲2.71
Add New Post /wp-admin/post-new.php1,517 ▼217.67 ▼5.40678.54 ▼22.4357.88 ▼13.41
Media Library /wp-admin/upload.php1,395 ▲104.19 ▼0.0798.78 ▼5.4343.69 ▲2.10
WP Bigcommerce /wp-admin/options-general.php?page=6869637cf7937e8eb8d2f2c2039bf2b08532.0529.9133.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-bigcommerce/src/WPBigcommerceServicesJson.php+156
    Array and string offset access syntax with curly braces is deprecated
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 40 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=6869637cf7937e8eb8d2f2c2039bf2b0
    • > Deprecated in wp-content/plugins/wp-bigcommerce/src/WPBigcommerceServicesJson.php+725
    Array and string offset access syntax with curly braces is deprecated
    • > GET request to /wp-admin/options-general.php?page=6869637cf7937e8eb8d2f2c2039bf2b0
    • > Deprecated in wp-content/plugins/wp-bigcommerce/src/WPBigcommerceServicesJson.php+115
    Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=6869637cf7937e8eb8d2f2c2039bf2b0
    • > Deprecated in wp-content/plugins/wp-bigcommerce/src/WPBigcommerceServicesJson.php+795
    Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=6869637cf7937e8eb8d2f2c2039bf2b0
    • > Notice in wp-content/plugins/wp-bigcommerce/wpbigcommerce.php+87
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-bigcommerce/assets/templates/product.html.php
    • > /wp-content/plugins/wp-bigcommerce/trunk/assets/templates/product.html.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-bigcommerce/presstrends.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-bigcommerce/wpbigcommerce.php:15
    • > PHP Notice
      Undefined variable: products in wp-content/plugins/wp-bigcommerce/assets/templates/product.html.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-bigcommerce/assets/templates/settings.html.php:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-bigcommerce/assets/templates/product.html.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-bigcommerce/trunk/assets/templates/settings.html.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-bigcommerce/trunk/wpbigcommerce.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-bigcommerce/trunk/presstrends.php:55
    • > PHP Notice
      Undefined variable: products in wp-content/plugins/wp-bigcommerce/trunk/assets/templates/product.html.php on line 2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-bigcommerce/trunk/assets/templates/product.html.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Quickly and easily list products from your Bigcommerce store on your Wordpress sites.), #2 (Control which fields are displayed to customise the product listing.)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-bigcommerce === )
You can look at the official readme.txt

wp-bigcommerce/wpbigcommerce.php 92% from 13 tests

This is the main PHP file of "WP Bigcommerce" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-bigcommerce.php" instead of "wpbigcommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,239 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP122703471,179
Markdown122054
CSS1006

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity19.33
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods98
▷ Static methods66.12%
▷ Public methods9697.96%
▷ Protected methods00.00%
▷ Private methods22.04%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants1881.82%
▷ Class constants418.18%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 1.02MB with 0.73MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/screenshot-2.png237.37KB68.40KB▼ 71.18%
trunk/screenshot-1.png282.85KB78.12KB▼ 72.38%
screenshot-2.png237.37KB68.40KB▼ 71.18%
screenshot-1.png282.85KB78.12KB▼ 72.38%