90% reduce-stock-of-manual-orders-for-woocommerce

Code Review | Reduce stock of manual orders for WooCommerce

WordPress plugin Reduce stock of manual orders for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: reduce-stock-of-m...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Sep 20, 2016
  • Latest release: Aug 11, 2020
  • Number of updates: 8
  • Update frequency: every 177.6 days
  • Top authors: claudiosanches (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /4,267 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by Reduce stock of manual orders for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.88 ▼3.65
Dashboard /wp-admin3.33 ▲0.0345.33 ▼5.33
Posts /wp-admin/edit.php3.38 ▲0.0349.78 ▼0.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.35 ▼8.65
Media Library /wp-admin/upload.php3.26 ▲0.0334.10 ▼1.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Reduce stock of manual orders for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.59 ▲0.021.82 ▼2.5240.04 ▼9.12
Dashboard /wp-admin2,209 ▲184.84 ▼1.06112.51 ▲8.7642.73 ▲1.58
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0040.53 ▼1.6435.08 ▲0.87
Add New Post /wp-admin/post-new.php1,522 ▲223.23 ▲0.05661.25 ▲19.2460.55 ▲7.75
Media Library /wp-admin/upload.php1,382 ▼34.20 ▼0.0793.96 ▼6.7941.42 ▼2.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: woocommerce, stock, increase, reduce

reduce-stock-of-manual-orders-for-woocommerce/reduce-stock-of-manual-orders-for-woocommerce.php 92% from 13 tests

"Reduce stock of manual orders for WooCommerce" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.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 plugin76 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2279376

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods444.44%
▷ Protected methods555.56%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin