89% woo-random-product-sorting-with-pagination

Code Review | WooCommerce Random Product Sorting with Pagination

WordPress plugin WooCommerce Random Product Sorting with Pagination scored89%from 54 tests.

About plugin

  • Plugin page: woo-random-produc...
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2017
  • Latest release: Sep 5, 2020
  • Number of updates: 22
  • Update frequency: every 69.2 days
  • Top authors: theseforumslookquitehelpful (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /11,861 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by WooCommerce Random Product Sorting with Pagination
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.04 ▼3.05
Dashboard /wp-admin3.31 ▲0.0151.26 ▲0.65
Posts /wp-admin/edit.php3.36 ▲0.0149.01 ▲2.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.91 ▼9.82
Media Library /wp-admin/upload.php3.24 ▲0.0139.56 ▲7.94

Server storage [IO: ▲0.01MB] [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_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Random Product Sorting with Pagination
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6813.25 ▼1.311.78 ▲0.1243.19 ▲4.49
Dashboard /wp-admin2,235 ▲324.84 ▼1.17112.53 ▲7.5144.33 ▼1.17
Posts /wp-admin/edit.php2,115 ▲122.07 ▲0.0636.15 ▼0.1536.85 ▲2.13
Add New Post /wp-admin/post-new.php1,554 ▲1423.16 ▲4.90616.88 ▼54.4752.51 ▼14.98
Media Library /wp-admin/upload.php1,417 ▲174.24 ▲0.02104.41 ▲5.4446.35 ▲0.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
6 plugin tags: pagination, random sorting, sorting, random, product sorting...

woo-random-product-sorting-with-pagination/paginated-random-products.php 85% from 13 tests

The main PHP script in "WooCommerce Random Product Sorting with Pagination" version 0.9.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-random-product-sorting-with-pagination.php" instead of "paginated-random-products.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin67 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP131149
PO File11118

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin