78% fast-cart

Code Review | Fast Cart for WooCommerce

WordPress plugin Fast Cart for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: fast-cart
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Feb 18, 2023
  • Latest release: Nov 22, 2023
  • Number of updates: 17
  • Update frequency: every 16.5 days
  • Top authors: wpxteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,590 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.62ms] Passed 4 tests

Analyzing server-side resources used by Fast Cart for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.36 ▼1.69
Dashboard /wp-admin3.31 ▲0.0151.35 ▲1.23
Posts /wp-admin/edit.php3.36 ▲0.0043.68 ▼3.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.06 ▼6.09
Media Library /wp-admin/upload.php3.23 ▲0.0035.65 ▲0.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Fast Cart for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3614.72 ▲0.481.86 ▲0.1640.03 ▼3.55
Dashboard /wp-admin2,206 ▲265.63 ▼0.0496.52 ▼4.1145.36 ▼0.66
Posts /wp-admin/edit.php2,108 ▲52.03 ▲0.0639.20 ▼1.6637.02 ▼3.39
Add New Post /wp-admin/post-new.php1,534 ▼223.14 ▲0.04669.39 ▲24.6757.18 ▼3.88
Media Library /wp-admin/upload.php1,408 ▲114.22 ▲0.0795.63 ▼5.9643.07 ▼0.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fast-cart/fast-cart.php
    • > /wp-content/plugins/fast-cart/includes/class-fast-cart.php
  • 3× 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/fast-cart/includes/style.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/fast-cart/includes/setting-tab/general.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/fast-cart/includes/layout.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #3, #4, #5 in fast-cart/assets to your readme.txt
The official readme.txt might help

fast-cart/fast-cart.php 92% from 13 tests

The main file in "Fast Cart for WooCommerce" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.8" instead of "5.5")

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
No dangerous file extensions were detected2,859 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP125252061,461
CSS11254941,228
JavaScript35328147
SVG111023

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.50
▷ Minimum class complexity2.00
▷ Maximum class complexity31.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods64
▷ Static methods2437.50%
▷ Public methods64100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/inline.png0.15KB0.15KB▼ 3.80%
admin/images/full.png0.16KB0.15KB▼ 5.03%