89% product-quantity-report-by-order-for-woocommerce

Code Review | Product Quantity Report By Order for Woocommerce

WordPress plugin Product Quantity Report By Order for Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: product-quantity-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.6
  • WordPress version: 6.3.1
  • First release: Aug 9, 2016
  • Latest release: Aug 12, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: vishalkakadiya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /847 total downloads

Benchmarks

Plugin footprint 82% 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.04MB] [CPU: ▼4.22ms] Passed 4 tests

A check of server-side resources used by Product Quantity Report By Order for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.19 ▼6.06
Dashboard /wp-admin3.34 ▲0.0451.44 ▲0.94
Posts /wp-admin/edit.php3.39 ▲0.0451.67 ▼3.29
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.98 ▼8.47
Media Library /wp-admin/upload.php3.27 ▲0.0442.82 ▲5.46

Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/product-quantity-report-by-order-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Product Quantity Report By Order for Woocommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.30 ▼1.121.84 ▼0.4043.36 ▲3.46
Dashboard /wp-admin2,221 ▲154.85 ▼0.06102.39 ▼14.5139.85 ▼5.28
Posts /wp-admin/edit.php2,100 ▼02.06 ▲0.0740.25 ▼1.4032.47 ▼6.06
Add New Post /wp-admin/post-new.php1,526 ▼1917.67 ▼5.60686.33 ▲21.2357.31 ▲2.72
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.03102.97 ▼7.6547.65 ▼0.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === product-quantity-report-by-order-for-woocommerce === )
You can look at the official readme.txt

product-quantity-report-by-order-for-woocommerce/product-wise-order-export-for-woocommerce-by-vk.php 92% from 13 tests

The main PHP script in "Product Quantity Report By Order for Woocommerce" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("product-quantity-report-by-order-for-woocommerce.php" instead of "product-wise-order-export-for-woocommerce-by-vk.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin278 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15341236
CSS16024
JavaScript11018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png57.82KB20.95KB▼ 63.77%
assets/screenshot-2.png75.82KB26.73KB▼ 64.75%