78% 3dcart-wp-online-store

Code Review | Shift4Shop Online Store

WordPress plugin Shift4Shop Online Store scored 78% from 54 tests.

About plugin

  • Plugin page: 3dcart-wp-online-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.1
  • WordPress version: 5.9.2
  • First release: Mar 23, 2012
  • Latest release: May 19, 2021
  • Number of updates: 37
  • Update frequency: every 90.4 days
  • Top authors: 3dcart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 12,879 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼289.92ms] Passed 4 tests

A check of server-side resources used by Shift4Shop Online Store
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0261.71 ▲4.49
Dashboard /wp-admin3.43 ▲0.0337.30 ▼0.68
Posts /wp-admin/edit.php3.66 ▲0.0243.83 ▲2.46
Add New Post /wp-admin/post-new.php6.89 ▼0.0797.74 ▼1,159.32
Media Library /wp-admin/upload.php3.31 ▲0.0224.81 ▼2.12
Shift4Shop /wp-admin/options-general.php?page=shift4shop3.2624.50

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 3 new options
New WordPress options
shift4shop_currency
shift4shop_siteurl
widget_shift4shop_widget

Browser metrics Passed 4 tests

Shift4Shop Online Store: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1415.83 ▲0.185.57 ▲0.052.58 ▼0.22
Dashboard /wp-admin2,897 ▲396.16 ▲0.02113.54 ▼25.91155.54 ▼17.19
Posts /wp-admin/edit.php2,693 ▲53.03 ▼0.2065.09 ▲2.56138.49 ▼6.61
Add New Post /wp-admin/post-new.php1,664 ▼8816.37 ▼5.41404.63 ▼58.96162.31 ▲6.02
Media Library /wp-admin/upload.php1,700 ▲25.52 ▲0.01135.10 ▼12.86182.64 ▼2.61
Shift4Shop /wp-admin/options-general.php?page=shift4shop1,0432.6251.74111.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 3 options in the database
    • shift4shop_currency
    • widget_shift4shop_widget
    • shift4shop_siteurl

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=shift4shop
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=shift4shop
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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 fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/3dcart-wp-online-store/inc/shortcode.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/3dcart-wp-online-store/inc/options.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/3dcart-wp-online-store/inc/widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: shopping cart, ecommerce, shift4shop online products, online store, shift4shop for wordpress...

3dcart-wp-online-store/shift4shop.php 92% from 13 tests

This is the main PHP file of "Shift4Shop Online Store" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("3dcart-wp-online-store.php" instead of "shift4shop.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,182 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript310410540
CSS285474
PHP44523168

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin