84% planned-soft-min-max-quantities

Code Review | Plannedsoft Min/Max Quantities

WordPress plugin Plannedsoft Min/Max Quantities scored84%from 54 tests.

About plugin

  • Plugin page: planned-soft-min-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 6.3.1
  • First release: Dec 12, 2021
  • Latest release: Dec 12, 2021
  • Number of updates: 3
  • Update frequency: every 8.3 days
  • Top authors: plannedsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /232 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.17ms] Passed 4 tests

Server-side resources used by Plannedsoft Min/Max Quantities
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.54 ▼2.04
Dashboard /wp-admin3.31 ▲0.0044.33 ▼4.92
Posts /wp-admin/edit.php3.36 ▲0.0044.04 ▼0.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.54 ▼4.47
Media Library /wp-admin/upload.php3.23 ▲0.0032.27 ▼1.26

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Plannedsoft Min/Max Quantities
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.49 ▲0.101.73 ▼0.3046.25 ▼3.72
Dashboard /wp-admin2,209 ▲214.86 ▼0.05107.02 ▼11.8438.89 ▼7.69
Posts /wp-admin/edit.php2,092 ▲61.99 ▼0.0544.79 ▲9.0336.53 ▲0.84
Add New Post /wp-admin/post-new.php1,533 ▼023.37 ▲0.05672.54 ▲57.0654.67 ▲4.08
Media Library /wp-admin/upload.php1,385 ▼04.21 ▲0.0098.57 ▼4.5644.73 ▼1.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 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 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
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Roles' not found in wp-content/plugins/planned-soft-min-max-quantities/includes/class-wc-min-max-quantities-admin.php:16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/planned-soft-min-max-quantities/plannedsoft-min-max-quantities.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/planned-soft-min-max-quantities/plannedsoft-min-max-quantities.php on line 25
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/planned-soft-min-max-quantities/plannedsoft-min-max-quantities.php on line 25

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
9 plugin tags: min max rules, plannedsoft, woocommece, min max quantity, minimum quantity...

planned-soft-min-max-quantities/plannedsoft-min-max-quantities.php 85% from 13 tests

The entry point to "Plannedsoft Min/Max Quantities" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("planned-soft-min-max-quantities.php" instead of "plannedsoft-min-max-quantities.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected6,930 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JSON2003,072
PHP154936231,640
CSS33861,513
SVG100362
JavaScript45240307
XML17336

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity31.10
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods85
▷ Static methods44.71%
▷ Public methods7891.76%
▷ Protected methods00.00%
▷ Private methods78.24%
Functions20
▷ Named functions1890.00%
▷ Anonymous functions210.00%
Constants7
▷ Global constants7100.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
17 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/remove.png3.32KB0.62KB▼ 81.33%
assets/admin/images/wc-tab-icons.png2.34KB2.12KB▼ 9.50%
assets/legacy/admin/images/toggle.png2.08KB1.78KB▼ 14.61%
assets/images/add.png3.37KB0.66KB▼ 80.54%
plannedsoft-core/assets/images/oldadmin-menu-icon.png0.46KB0.64KB0.00%