84% sorting-woocommerce-lite-edition

Code Review | Sorting WooCommerce Lite

WordPress plugin Sorting WooCommerce Lite scored84%from 54 tests.

About plugin

  • Plugin page: sorting-woocommer...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.6
  • WordPress version: 6.3.1
  • First release: Aug 4, 2013
  • Latest release: Aug 4, 2013
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: GalalAly2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,486 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Sorting WooCommerce Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.36 ▼5.98
Dashboard /wp-admin3.32 ▲0.0156.14 ▼2.36
Posts /wp-admin/edit.php3.37 ▲0.0149.78 ▼3.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.92 ▼10.27
Media Library /wp-admin/upload.php3.24 ▲0.0142.40 ▲5.77

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Sorting WooCommerce Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3914.54 ▲0.192.04 ▲0.0645.69 ▲4.39
Dashboard /wp-admin2,206 ▲265.52 ▼0.0694.94 ▲0.8542.85 ▲2.69
Posts /wp-admin/edit.php2,115 ▲152.02 ▲0.0436.05 ▼4.8837.23 ▼1.23
Add New Post /wp-admin/post-new.php1,539 ▲923.02 ▼0.26653.06 ▲28.3854.31 ▲1.70
Media Library /wp-admin/upload.php1,408 ▲84.15 ▼0.02104.16 ▼5.7243.42 ▼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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/sorting-woocommerce-lite-edition/plugin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/sorting-woocommerce-lite-edition/options.php:53
    • > PHP Warning
      Use of undefined constant sorting_woocommerce_lite_url - assumed 'sorting_woocommerce_lite_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/sorting-woocommerce-lite-edition/options.php on line 36

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: catalog, shop, sorting, woocommerce, dropdown

sorting-woocommerce-lite-edition/plugin.php 92% from 13 tests

"Sorting WooCommerce Lite" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sorting-woocommerce-lite-edition.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin156 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21916156

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
sorting-woocommerce-thumbnail.png8.12KB3.37KB▼ 58.51%