89% sort-products-in-cart-order-lite-for-woocommerce

Code Review | Sort Products in Cart & Order Lite for WooCommerce

WordPress plugin Sort Products in Cart & Order Lite for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: sort-products-in-...
  • Plugin version: 1.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 15, 2020
  • Latest release: Jul 8, 2023
  • Number of updates: 13
  • Update frequency: every 80.0 days
  • Top authors: kartikparmar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /843 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
Installer ran successfully

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

Server-side resources used by Sort Products in Cart & Order Lite for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.76 ▼3.82
Dashboard /wp-admin3.31 ▲0.0146.92 ▼2.46
Posts /wp-admin/edit.php3.36 ▲0.0150.37 ▲6.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.69 ▼4.15
Media Library /wp-admin/upload.php3.24 ▲0.0132.80 ▼4.38

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Sort Products in Cart & Order Lite for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.23 ▼1.191.72 ▼0.3141.08 ▼4.74
Dashboard /wp-admin2,203 ▲185.79 ▲0.9098.82 ▼18.4440.74 ▼5.32
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0139.35 ▲2.7636.96 ▲0.46
Add New Post /wp-admin/post-new.php1,547 ▲2718.04 ▼5.25591.43 ▼94.2765.76 ▲9.83
Media Library /wp-admin/upload.php1,388 ▲34.20 ▲0.0193.77 ▼12.5940.90 ▼4.44

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === sort-products-in-cart-order-lite-for-woocommerce === )
Please take inspiration from this readme.txt

sort-products-in-cart-order-lite-for-woocommerce/sort-products-in-cart-order-lite-for-woocommerce.php 77% from 13 tests

The main PHP file in "Sort Products in Cart & Order Lite for WooCommerce" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.6" instead of "3.0.0")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected129 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP339104129

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin