90% paged-product-variations

Code Review | WooCommerce Paged Product Variations

WordPress plugin WooCommerce Paged Product Variations scored90%from 54 tests.

About plugin

  • Plugin page: paged-product-var...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 19, 2015
  • Latest release: Aug 10, 2015
  • Number of updates: 3
  • Update frequency: every 8.0 days
  • Top authors: Omac (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,944 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.04MB] [CPU: ▼5.32ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Paged Product Variations
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0337.74 ▼5.65
Dashboard /wp-admin3.38 ▲0.0450.02 ▼5.67
Posts /wp-admin/edit.php3.50 ▲0.1051.07 ▼8.44
Add New Post /wp-admin/post-new.php5.96 ▲0.0391.30 ▲1.73
Media Library /wp-admin/upload.php3.30 ▲0.0334.91 ▼1.53

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Paged Product Variations
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▼0.031.70 ▼0.2344.07 ▲0.95
Dashboard /wp-admin2,195 ▲185.66 ▼0.0291.26 ▼7.0242.33 ▼2.42
Posts /wp-admin/edit.php2,097 ▼31.99 ▲0.0338.99 ▲0.7538.75 ▲0.43
Add New Post /wp-admin/post-new.php1,526 ▼023.33 ▲0.22673.59 ▲24.5451.52 ▲1.58
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.0095.24 ▼9.4144.13 ▼5.52

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: product, variations, woocommerce

paged-product-variations/woocommerce-paged-product-variations.php 92% from 13 tests

"WooCommerce Paged Product Variations" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("paged-product-variations.php" instead of "woocommerce-paged-product-variations.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
Everything looks great! No dangerous files found in this plugin289 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14740175
JavaScript1401898
Markdown18016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
1 PNG file occupies 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png165.48KB53.33KB▼ 67.77%