77% e-commerce-by-salescart

Code Review | E-Commerce by SalesCart

WordPress plugin E-Commerce by SalesCart scored 77% from 54 tests.

About plugin

  • Plugin page: e-commerce-by-sal...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.1
  • WordPress version: 6.3.1
  • First release: Apr 22, 2015
  • Latest release: Feb 25, 2019
  • Number of updates: 27
  • Update frequency: every 52.2 days
  • Top authors: codeaholic (92.59%)Otto42 (11.11%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,546 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲1.42ms] Passed 4 tests

Analyzing server-side resources used by E-Commerce by SalesCart
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.15 ▼4.99
Dashboard /wp-admin3.32 ▲0.0161.08 ▲2.85
Posts /wp-admin/edit.php3.37 ▲0.0158.10 ▼0.34
Add New Post /wp-admin/post-new.php5.90 ▲0.01112.28 ▲11.37
Media Library /wp-admin/upload.php3.24 ▲0.0145.31 ▲8.17

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
scart_store_id
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by E-Commerce by SalesCart
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲7513.60 ▼0.696.32 ▲4.2145.29 ▼1.63
Dashboard /wp-admin2,208 ▲54.92 ▼0.88109.22 ▼17.5073.54 ▲30.12
Posts /wp-admin/edit.php2,115 ▲202.00 ▼0.0541.59 ▼0.0635.23 ▲0.02
Add New Post /wp-admin/post-new.php1,560 ▲2724.02 ▲0.82763.96 ▲94.4053.62 ▲1.79
Media Library /wp-admin/upload.php1,399 ▲114.20 ▼0.03100.14 ▼11.3574.70 ▲29.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/e-commerce-by-salescart/css/index.php
    • > /wp-content/plugins/e-commerce-by-salescart/fonts/index.php
    • > /wp-content/plugins/e-commerce-by-salescart/libs/index.php
    • > /wp-content/plugins/e-commerce-by-salescart/views/index.php
    • > /wp-content/plugins/e-commerce-by-salescart/index.php
    • > /wp-content/plugins/e-commerce-by-salescart/js/index.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/e-commerce-by-salescart/libs/scart_display.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/e-commerce-by-salescart/views/landing.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/e-commerce-by-salescart/salescart-ecommerce.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (24 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

e-commerce-by-salescart/salescart-ecommerce.php 77% from 13 tests

The main PHP script in "E-Commerce by SalesCart" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 258 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("e-commerce-by-salescart.php" instead of "salescart-ecommerce.php")

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
There were no executable files found in this plugin3,149 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
SVG4002,654
CSS23120284
PHP44766192
JavaScript281819

PHP code Passed 2 tests

This is a short overview 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.04
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png4.23KB1.03KB▼ 75.61%
images/start_now.png4.53KB0.90KB▼ 80.14%
images/Main-Sm-SalesCart-Logo.png11.13KB3.63KB▼ 67.42%