89% woocommerce-products-per-page

Code Review | WooCommerce Products Per Page

WordPress plugin WooCommerce Products Per Page scored 89% from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2014
  • Latest release: Jan 2, 2023
  • Number of updates: 93
  • Update frequency: every 34.7 days
  • Top authors: sormano (100%)

Code review

54 tests

User reviews

79 reviews

Install metrics

10,000+ active / 233,605 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.31ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Products Per Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.01 ▼7.79
Dashboard /wp-admin3.34 ▲0.0444.55 ▼7.83
Posts /wp-admin/edit.php3.45 ▲0.1045.36 ▼6.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.10 ▼3.18
Media Library /wp-admin/upload.php3.26 ▲0.0333.19 ▼3.20

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Products Per Page
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.27 ▼1.041.61 ▼0.5439.72 ▼10.76
Dashboard /wp-admin2,206 ▲155.78 ▲0.7596.83 ▼6.0237.36 ▼9.07
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0336.92 ▲0.8433.15 ▼0.91
Add New Post /wp-admin/post-new.php1,520 ▼1423.26 ▲0.23641.57 ▼31.8352.61 ▲0.16
Media Library /wp-admin/upload.php1,385 ▼04.16 ▼0.0597.43 ▼2.9343.58 ▼2.31

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Dropdown box on the WooCommerce products page), #2 (Close-up of the WooCommerce products per page dropdown), #3 (WooCommerce Settings page)
Please take inspiration from this readme.txt

woocommerce-products-per-page/woocommerce-products-per-page.php 92% from 13 tests

"WooCommerce Products Per Page" version 1.2.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0.0" instead of "3.0")

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
Success! There were no dangerous files found in this plugin945 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PO File11190247624
PHP4159337321

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity12.50
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods13.57%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.12MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png61.19KB62.98KB0.00%
screenshot-1.png57.05KB61.09KB0.00%
screenshot-2.png1.29KB0.71KB▼ 45.34%