83% min-and-max-for-woocommerce

Code Review | Min and Max for WooCommerce

WordPress plugin Min and Max for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: min-and-max-for-w...
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Jul 10, 2020
  • Latest release: May 11, 2023
  • Number of updates: 15
  • Update frequency: every 69.1 days
  • Top authors: hossain88 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.64ms] Passed 4 tests

Analyzing server-side resources used by Min and Max for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.54 ▲1.49
Dashboard /wp-admin3.32 ▲0.0252.32 ▼0.25
Posts /wp-admin/edit.php3.38 ▲0.0248.08 ▼0.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.30 ▼3.23
Media Library /wp-admin/upload.php3.25 ▲0.0237.30 ▲3.37
Min & Max Quantity /wp-admin/options-general.php?page=_mmfwc_3.2134.68

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Min and Max for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.121.66 ▼0.4145.77 ▲0.73
Dashboard /wp-admin2,196 ▲195.53 ▼0.0491.50 ▼9.7738.41 ▼6.63
Posts /wp-admin/edit.php2,101 ▲11.95 ▲0.0033.24 ▼2.8036.02 ▲0.15
Add New Post /wp-admin/post-new.php1,529 ▲123.66 ▲0.45675.81 ▼26.8665.99 ▲8.95
Media Library /wp-admin/upload.php1,401 ▼24.22 ▲0.08102.03 ▼8.3242.99 ▼2.90
Min & Max Quantity /wp-admin/options-general.php?page=_mmfwc_8012.0026.5827.06

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 detected upon uninstall: 9 options
    • db_upgraded
    • mmfwc_options_option_name
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • mmfwc_installed
    • theysaidso_admin_options
    • widget_recent-posts
    • mmfwc_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Trait 'MinMaxWoocommerce\\Traits\\Singleton' not found in wp-content/plugins/min-and-max-for-woocommerce/includes/Admin/Settings.php on line 11
    • > PHP Fatal error
      Trait 'MinMaxWoocommerce\\Traits\\Singleton' not found in wp-content/plugins/min-and-max-for-woocommerce/includes/Frontend/Storefront.php on line 6

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 86% 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
Attributes that require attention: You can take inspiration from this readme.txt

min-and-max-for-woocommerce/min-max-for-woocommerce.php 77% from 13 tests

The main file in "Min and Max for WooCommerce" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("min-and-max-for-woocommerce.php" instead of "min-max-for-woocommerce.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected733 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP21210505714
JSON10019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.40
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits1
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods57
▷ Static methods610.53%
▷ Public methods5596.49%
▷ Protected methods00.00%
▷ Private methods23.51%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.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
There were not PNG files found in your plugin