78% 3dcart-wp-online-store

Code Review | Shift4Shop Online Store

WordPress plugin Shift4Shop Online Store scored78%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: 6.3.1
  • 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

70+ active /13,866 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.16ms] Passed 4 tests

A check of server-side resources used by Shift4Shop Online Store
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.76 ▼5.78
Dashboard /wp-admin3.32 ▲0.0246.53 ▼2.30
Posts /wp-admin/edit.php3.37 ▲0.0248.48 ▲4.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.27 ▼1.33
Media Library /wp-admin/upload.php3.24 ▲0.0235.96 ▲0.77
Shift4Shop /wp-admin/options-general.php?page=shift4shop3.1928.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Shift4Shop Online Store
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.29 ▼1.091.69 ▼0.3937.92 ▼13.46
Dashboard /wp-admin2,210 ▲224.83 ▼0.03110.07 ▼9.2541.53 ▼0.32
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0039.52 ▲4.6734.76 ▼1.40
Add New Post /wp-admin/post-new.php1,536 ▲323.31 ▲0.15590.75 ▼29.4553.47 ▼3.15
Media Library /wp-admin/upload.php1,389 ▲14.19 ▼0.0796.48 ▼3.4141.19 ▼0.67
Shift4Shop /wp-admin/options-general.php?page=shift4shop8071.7124.8125.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • can_compress_scripts
    • shift4shop_currency
    • db_upgraded
    • widget_shift4shop_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • shift4shop_siteurl
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=shift4shop
    • > User deprecated in wp-includes/functions.php+5463
    Function 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+5463
    Function 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/3dcart-wp-online-store/inc/widget.php:6
    • > 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

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: shift4shop for wordpress, e-commerce, ecommerce, shift4shop online products, shift4shop wordpress...

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

"Shift4Shop Online Store" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to 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 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable 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

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems 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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin