10% scottcart

Code Review | WordPress eCommerce - ScottCart

WordPress plugin WordPress eCommerce - ScottCart scored10%from 54 tests.

About plugin

  • Plugin page: scottcart
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 9, 2017
  • Latest release: Aug 25, 2023
  • Number of updates: 43
  • Update frequency: every 55.4 days
  • Top authors: scottpaterson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,560 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/scottcart/includes/settings/settings_api.php+267
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲1.72MB] [CPU: ▲11.30ms] Passed 4 tests

This is a short check of server-side resources used by WordPress eCommerce - ScottCart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.78 ▲1.3254.06 ▲15.45
Dashboard /wp-admin5.19 ▲1.8472.23 ▲11.52
Posts /wp-admin/edit.php5.27 ▲1.9165.47 ▲19.75
Add New Post /wp-admin/post-new.php7.77 ▲1.8997.33 ▲2.30
Media Library /wp-admin/upload.php5.08 ▲1.8550.68 ▲15.92
Reports /wp-admin/admin.php?page=scottcart_reports5.0852.20
   -Tags /wp-admin/edit-tags.php?taxonomy=product_tag&post_type=scottcart_product5.1052.45
Customers /wp-admin/edit.php?post_type=scottcart_customer5.1857.08
Discounts /wp-admin/edit.php?post_type=scottcart_discount5.1857.56
Settings /wp-admin/admin.php?page=scottcart_settings_page5.1855.31
Orders /wp-admin/edit.php?post_type=scottcart_order5.1856.05
   -Categories /wp-admin/edit-tags.php?taxonomy=product_category&post_type=scottcart_product5.1054.60
   -Features /wp-admin/edit-tags.php?taxonomy=product_feature&post_type=scottcart_product5.1050.58
Products /wp-admin/edit.php?post_type=scottcart_product5.1852.55

Server storage [IO: ▲0.76MB] [DB: ▲0.09MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 71 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_recent-comments
scottcart_firstrun
scottcart_settings
theysaidso_admin_options
scottcart_pages
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WordPress eCommerce - ScottCart
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,382 ▲61116.20 ▲1.807.94 ▲6.1539.97 ▼2.73
Dashboard /wp-admin2,643 ▲4686.98 ▲1.32117.09 ▲19.85118.22 ▲78.15
Posts /wp-admin/edit.php2,515 ▲4153.87 ▲1.8756.98 ▲20.2097.42 ▲62.68
Add New Post /wp-admin/post-new.php1,754 ▲22823.44 ▲0.40584.19 ▼32.97182.09 ▲124.23
Media Library /wp-admin/upload.php1,655 ▲2555.01 ▲0.8594.30 ▼4.26101.90 ▲56.77
Reports /wp-admin/admin.php?page=scottcart_reports1,2403.4851.6787.55
   -Tags /wp-admin/edit-tags.php?taxonomy=product_tag&post_type=scottcart_product1,6623.6860.1485.71
Customers /wp-admin/edit.php?post_type=scottcart_customer1,4733.7554.1174.52
Discounts /wp-admin/edit.php?post_type=scottcart_discount1,4713.8562.5469.11
Settings /wp-admin/admin.php?page=scottcart_settings_page5,90510.75299.81110.32
Orders /wp-admin/edit.php?post_type=scottcart_order1,4733.7859.72102.26
   -Categories /wp-admin/edit-tags.php?taxonomy=product_category&post_type=scottcart_product1,6993.7558.0097.90
   -Features /wp-admin/edit-tags.php?taxonomy=product_feature&post_type=scottcart_product1,6993.5757.6487.94
Products /wp-admin/edit.php?post_type=scottcart_product1,4743.6753.2875.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • scottcart_pages
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • scottcart_settings
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Shopping Cart - You can sell anything you want with our complete shopping cart. You can offer discount codes, collect taxes and charge shipping) image not found
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

scottcart/scottcart.php Passed 13 tests

The principal PHP file in "WordPress eCommerce - ScottCart" v. 1.1 is loaded by WordPress automatically on each request
30 characters long description:
A complete eCommerce solution.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin11,715 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP442,8849949,099
JavaScript176601771,708
CSS322236908

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.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions206
▷ Named functions206100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/paypal.png2.07KB1.87KB▼ 9.65%
assets/images/trash.png0.16KB0.16KB0.00%
assets/images/ui-icons_999999_256x240.png3.62KB4.11KB0.00%
assets/images/ui-icons_333333_256x240.png3.62KB4.11KB0.00%