90% wpc-product-quantity

Code Review | WPC Product Quantity for WooCommerce

WordPress plugin WPC Product Quantity for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wpc-product-quantity
  • Plugin version: 4.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 20, 2019
  • Latest release: Oct 18, 2023
  • Number of updates: 112
  • Update frequency: every 14.7 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /83,486 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼6.72ms] Passed 4 tests

A check of server-side resources used by WPC Product Quantity for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3436.62 ▼4.98
Dashboard /wp-admin3.64 ▲0.3048.04 ▼12.86
Posts /wp-admin/edit.php3.76 ▲0.4042.63 ▼11.39
Add New Post /wp-admin/post-new.php6.25 ▲0.3692.29 ▲2.35
Media Library /wp-admin/upload.php3.57 ▲0.3441.51 ▲6.48
About /wp-admin/admin.php?page=wpclever3.5330.91
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.7537.31

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPC Product Quantity for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲9514.35 ▼0.021.70 ▼0.2240.98 ▼4.35
Dashboard /wp-admin2,272 ▲955.58 ▼0.0782.79 ▼16.8776.94 ▲31.73
Posts /wp-admin/edit.php2,182 ▲822.02 ▲0.0137.66 ▼1.4630.03 ▼2.57
Add New Post /wp-admin/post-new.php1,596 ▲5923.17 ▲0.07723.40 ▲87.3251.60 ▼14.61
Media Library /wp-admin/upload.php1,471 ▲774.17 ▼0.0399.74 ▼1.1783.97 ▲36.23
About /wp-admin/admin.php?page=wpclever1,4002.1439.8135.94
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7352.1341.1372.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: woo, min, wpc, max, qty...

wpc-product-quantity/wpc-product-quantity.php Passed 13 tests

"WPC Product Quantity for WooCommerce" version 4.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
69 characters long description:
WPC Product Quantity provides powerful controls for product quantity.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin3,486 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP6301761,767
CSS413610758
JavaScript4919464
Sass1520318
PO File15463150
SVG10029

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity61.25
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods63
▷ Static methods34.76%
▷ Public methods63100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants10
▷ Global constants10100.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