84% woomaxmin

Code Review | WooMaxMin for WooCommerce

WordPress plugin WooMaxMin for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woomaxmin
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7
  • WordPress version: 6.3.1
  • First release: Mar 16, 2016
  • Latest release: Mar 16, 2016
  • Number of updates: 5
  • Update frequency: every 53.4 days
  • Top authors: himanshubhuyan0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,517 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.50ms] Passed 4 tests

An overview of server-side resources used by WooMaxMin for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.45 ▼2.27
Dashboard /wp-admin3.37 ▲0.0746.13 ▲1.51
Posts /wp-admin/edit.php3.42 ▲0.0648.67 ▼2.62
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.91 ▼18.61
Media Library /wp-admin/upload.php3.29 ▲0.0641.36 ▲6.86

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

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

Browser metrics Passed 4 tests

WooMaxMin for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.24 ▼1.031.59 ▼0.1939.22 ▼9.13
Dashboard /wp-admin2,221 ▲334.93 ▲0.06107.46 ▼8.6186.20 ▲48.09
Posts /wp-admin/edit.php2,107 ▲182.00 ▼0.0334.10 ▼3.2033.32 ▲1.22
Add New Post /wp-admin/post-new.php1,681 ▲13822.43 ▲4.25723.07 ▲112.3354.59 ▼1.17
Media Library /wp-admin/upload.php1,400 ▲124.20 ▼0.0295.72 ▼0.1272.52 ▲27.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 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 50% from 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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woomaxmin/admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woomaxmin/woomaxmin.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

woomaxmin/woomaxmin.php Passed 13 tests

The main PHP file in "WooMaxMin for WooCommerce" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
102 characters long description:
An e-commerce add-on for WooCommerce, Add minimum and maximum purchase limit in your WooCommerce shop.

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
Good job! No executable or dangerous file extensions detected507 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP31120434
CSS20553
JavaScript20520

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/woomaxmin.png0.86KB0.77KB▼ 10.59%