90% products-per-page-for-woocommerce

Code Review | Products per Page for WooCommerce

WordPress plugin Products per Page for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: products-per-page...
  • Plugin version: 2.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 29, 2016
  • Latest release: Oct 3, 2023
  • Number of updates: 33
  • Update frequency: every 74.7 days
  • Top authors: algoritmika (84.85%)wpcodefactory (18.18%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /18,678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Products per Page for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.97 ▲0.81
Dashboard /wp-admin3.32 ▲0.0251.42 ▲3.79
Posts /wp-admin/edit.php3.37 ▲0.0146.95 ▼7.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.98 ▼18.46
Media Library /wp-admin/upload.php3.24 ▲0.0139.35 ▲3.51

Server storage [IO: ▲0.06MB] [DB: ▲0.31MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Products per Page for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.21 ▼0.151.81 ▲0.0344.25 ▼2.70
Dashboard /wp-admin2,195 ▲185.60 ▼0.0587.47 ▼6.8640.71 ▼6.99
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0434.79 ▼2.9533.25 ▼1.07
Add New Post /wp-admin/post-new.php1,526 ▼223.44 ▲0.33686.15 ▼11.5157.05 ▼0.93
Media Library /wp-admin/upload.php1,394 ▼04.20 ▼0.0296.08 ▼2.9943.06 ▼6.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Products per Page for WooCommerce - Frontend example)
You can look at the official readme.txt

products-per-page-for-woocommerce/products-per-page-for-woocommerce.php Passed 13 tests

The main PHP script in "Products per Page for WooCommerce" version 2.1.4 is automatically included on every request by WordPress
43 characters long description:
Products per page selector for WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin817 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8109434817

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity16.67
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods43
▷ Static methods12.33%
▷ Public methods43100.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
No PNG images were found in this plugin