90% woocommerce-extra-product-sorting-options

Code Review | Extra Product Sorting Options for WooCommerce

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

About plugin

  • Plugin page: woocommerce-extra...
  • Plugin version: 2.10.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2014
  • Latest release: Jul 28, 2023
  • Number of updates: 70
  • Update frequency: every 46.9 days
  • Top authors: beka.rice (55.71%)SkyVerge (45.71%)

Code review

54 tests

User reviews

26 reviews

Install metrics

10,000+ active /206,650 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.08ms] Passed 4 tests

Server-side resources used by Extra Product Sorting Options for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.48 ▼3.04
Dashboard /wp-admin3.38 ▲0.0851.42 ▼2.42
Posts /wp-admin/edit.php3.49 ▲0.1451.36 ▼0.31
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.81 ▼18.56
Media Library /wp-admin/upload.php3.30 ▲0.0839.36 ▲4.25

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Extra Product Sorting Options for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.18 ▼1.061.79 ▲0.0043.59 ▼2.79
Dashboard /wp-admin2,221 ▲365.84 ▲0.9799.10 ▼6.4137.75 ▼9.03
Posts /wp-admin/edit.php2,104 ▲152.00 ▼0.0138.35 ▲1.1334.70 ▼4.81
Add New Post /wp-admin/post-new.php1,553 ▲3423.04 ▼0.42655.63 ▼14.9853.33 ▼2.99
Media Library /wp-admin/upload.php1,403 ▲154.24 ▼0.06100.46 ▼4.1143.82 ▲0.54

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

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: sorting, product sorting, woocommerce, orderby

woocommerce-extra-product-sorting-options/woocommerce-extra-product-sorting-options.php 92% from 13 tests

The principal PHP file in "Extra Product Sorting Options for WooCommerce" v. 2.10.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.6" instead of "3.9.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin549 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2187368405
PO File13584134
JavaScript24110

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity28.50
▷ Minimum class complexity6.00
▷ Maximum class complexity51.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods517.24%
▷ Public methods2379.31%
▷ Protected methods00.00%
▷ Private methods620.69%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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