90% woocommerce-more-sorting

Code Review | More Sorting Options for WooCommerce

WordPress plugin More Sorting Options for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: woocommerce-more-...
  • Plugin version: 3.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Apr 8, 2013
  • Latest release: Jun 1, 2022
  • Number of updates: 56
  • Update frequency: every 59.7 days
  • Top authors: algoritmika (58.93%)wpwham (42.86%)

Code review

54 tests

User reviews

11 reviews

Install metrics

4,000+ active /62,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.89ms] Passed 4 tests

Server-side resources used by More Sorting Options for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.61 ▼4.63
Dashboard /wp-admin3.34 ▲0.0453.82 ▼0.13
Posts /wp-admin/edit.php3.39 ▲0.0453.88 ▼0.03
Add New Post /wp-admin/post-new.php5.92 ▲0.0496.02 ▼14.77
Media Library /wp-admin/upload.php3.27 ▲0.0440.37 ▲2.38

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for More Sorting Options for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.151.88 ▲0.0744.28 ▲2.84
Dashboard /wp-admin2,198 ▲275.59 ▲0.0397.57 ▲9.1342.86 ▼2.49
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0435.49 ▼5.0835.18 ▼2.03
Add New Post /wp-admin/post-new.php1,534 ▲818.42 ▼4.98658.73 ▲24.7770.02 ▲12.43
Media Library /wp-admin/upload.php1,400 ▲34.19 ▼0.0297.94 ▼8.2544.02 ▼4.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: woocommerce, sorting, sort

woocommerce-more-sorting/woocommerce-more-sorting.php 92% from 13 tests

This is the main PHP file of "More Sorting Options for WooCommerce" version 3.2.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.4" instead of "3.0.0")

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
Good job! No executable or dangerous file extensions detected1,276 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP131534871,276

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity10.17
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods48
▷ Static methods918.75%
▷ Public methods48100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin