89% wholesale-products-dynamic-pricing-management-woocommerce

Code Review | WholeSale Products Dynamic Pricing Management WooCommerce

WordPress plugin WholeSale Products Dynamic Pricing Management WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wholesale-product...
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2019
  • Latest release: Jul 13, 2023
  • Number of updates: 16
  • Update frequency: every 83.1 days
  • Top authors: taz_bambu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,065 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼0.59ms] Passed 4 tests

Analyzing server-side resources used by WholeSale Products Dynamic Pricing Management WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1744.46 ▲2.29
Dashboard /wp-admin3.48 ▲0.1350.55 ▼13.48
Posts /wp-admin/edit.php3.59 ▲0.2350.65 ▲1.33
Add New Post /wp-admin/post-new.php6.08 ▲0.19119.17 ▲21.83
Media Library /wp-admin/upload.php3.40 ▲0.1742.91 ▲7.50
WholeSale Management /wp-admin/admin.php?page=wholesale-products-dynamic-pricing-management-woocommerce3.3732.97

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
WholeProdDynWooCommerceuserRoles
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

WholeSale Products Dynamic Pricing Management WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲10114.52 ▲0.171.67 ▼0.0142.64 ▼1.82
Dashboard /wp-admin2,253 ▲765.54 ▼0.1284.32 ▼18.6483.59 ▲42.09
Posts /wp-admin/edit.php2,170 ▲702.00 ▲0.0240.16 ▲2.1537.15 ▲1.37
Add New Post /wp-admin/post-new.php1,753 ▲22722.08 ▼1.08688.15 ▼4.1250.58 ▼2.96
Media Library /wp-admin/upload.php1,470 ▲674.18 ▼0.0098.74 ▼2.2771.57 ▲24.08
WholeSale Management /wp-admin/admin.php?page=wholesale-products-dynamic-pricing-management-woocommerce9832.0524.9926.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • WholeProdDynWooCommerceuserRoles
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #3 (Product Edit Screen wholesale prices fields) image required
The official readme.txt is a good inspiration

wholesale-products-dynamic-pricing-management-woocommerce/wholesale-products-dynamic-pricing-management-woocommerce.php 92% from 13 tests

The main PHP script in "WholeSale Products Dynamic Pricing Management WooCommerce" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "2.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,431 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG100685
PHP219236475
CSS2379243
JavaScript18228

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity31.00
▷ Minimum class complexity4.00
▷ Maximum class complexity58.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/extendwp.png5.75KB3.37KB▼ 41.46%
images/wholesale-products-dynamic-pricing-management-woocommerce-pro.png36.50KB18.96KB▼ 48.06%