74% advanced-dynamic-pricing-for-woocommerce

Code Review | Advanced Dynamic Pricing for WooCommerce

WordPress plugin Advanced Dynamic Pricing for WooCommerce scored 74% from 54 tests.

About plugin

  • Plugin page: advanced-dynamic-...
  • Plugin version: 4.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 5.9.2
  • First release: Nov 10, 2017
  • Latest release: Feb 28, 2022
  • Number of updates: 217
  • Update frequency: every 7.2 days
  • Top authors: algol.plus (100%)

Code review

54 tests

User reviews

80 reviews

Install metrics

20,000+ active / 376,308 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼295.24ms] Passed 4 tests

An overview of server-side resources used by Advanced Dynamic Pricing for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1461.58 ▲5.74
Dashboard /wp-admin3.48 ▲0.0834.33 ▼13.30
Posts /wp-admin/edit.php3.71 ▲0.0740.51 ▼0.09
Add New Post /wp-admin/post-new.php6.95 ▼0.0297.52 ▼1,173.10
Media Library /wp-admin/upload.php3.36 ▲0.0729.13 ▲5.54

Server storage [IO: ▲2.78MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 485 new files
Database: 4 new tables, no new options
New tables

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Dynamic Pricing for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.78 ▼0.246.13 ▼0.562.75 ▲0.38
Dashboard /wp-admin2,895 ▲416.10 ▼0.09126.10 ▼9.00160.83 ▼5.30
Posts /wp-admin/edit.php2,706 ▲183.24 ▲0.0165.40 ▼21.85143.72 ▼1.27
Add New Post /wp-admin/post-new.php1,672 ▲1115.67 ▼1.16420.44 ▼6.84195.85 ▲29.80
Media Library /wp-admin/upload.php1,712 ▲115.52 ▼0.01150.54 ▼18.81201.07 ▲12.55

Uninstaller [IO: ▲2.78MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Incomplete uninstall procedure, leaving 485 files (2.78MB) in the plugin directory
    • (new file) BaseVersion/Includes/AdminExtensions/AdminPage.php
    • (new file) BaseVersion/Includes/AdminExtensions/AdminNotice.php
    • (new file) BaseVersion/Includes/AdminExtensions/AdminPage/AdminPageFilterTitles.php
    • (new file) BaseVersion/Includes/AdminExtensions/AdminPage/AdminTabInterface.php
    • (new file) BaseVersion/Includes/AdminExtensions/AdminPage/Tabs/Options.php
    • (new file) BaseVersion/Includes/AdminExtensions/AdminPage/Tabs/Help.php
    • (new file) BaseVersion/Includes/AdminExtensions/AdminPage/Tabs/Collections.php
    • (new file) BaseVersion/Includes/AdminExtensions/AdminPage/Tabs/Compatibility.php
    • (new file) BaseVersion/Includes/AdminExtensions/AdminPage/Paginator.php
    • (new file) AutoLoader.php
    • ...
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_wdp_persistent_rules_cache
    • wp_wdp_rules
    • wp_wdp_order_items
    • wp_wdp_orders

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
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 items
  • 24× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ADP\\BaseVersion\\Includes\\Enums\\BaseEnum' not found in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/BaseVersion/Includes/Enums/GiftModeEnum.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'ADP\\BaseVersion\\Includes\\Database\\Repository\\OrderRepositoryInterface' not found in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/BaseVersion/Includes/Database/Repository/OrderRepository.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ADP\\BaseVersion\\Includes\\Enums\\BaseEnum' not found in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/BaseVersion/Includes/Enums/AutoAddChoiceTypeEnum.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'ADP\\BaseVersion\\Includes\\AdminExtensions\\AdminPage\\AdminTabInterface' not found in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/BaseVersion/Includes/AdminExtensions/AdminPage/Tabs/Compatibility.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/BaseVersion/views/admin_page/tabs/tools/manage_bulk_ranges.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ADP\\BaseVersion\\Includes\\Database\\Repository\\OrderItemRepositoryInterface' not found in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/BaseVersion/Includes/Database/Repository/OrderItemRepository.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ADP\\BaseVersion\\Includes\\Enums\\BaseEnum' not found in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/BaseVersion/Includes/Enums/GiftChoiceMethodEnum.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'ADP\\BaseVersion\\Includes\\Database\\Repository\\RuleRepositoryInterface' not found in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/BaseVersion/Includes/Database/Repository/RuleRepository.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ADP\\Settings\\Varieties\\Option\\Abstracts\\Option' not found in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/Settings/Varieties/Option/BooleanOption.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'ADP\\Settings\\Interfaces\\OriginOptionInterface' not found in wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/Settings/Varieties/Option/Interfaces/OptionInterface.php:7

User-side errors Passed 1 test

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: pricing rule, dynamic pricing, bulk discount, woocommerce, deals...

advanced-dynamic-pricing-for-woocommerce/advanced-dynamic-pricing-for-woocommerce.php 92% from 13 tests

"Advanced Dynamic Pricing for WooCommerce" version 4.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("4.8" instead of "3.6")

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
Everything looks great! No dangerous files found in this plugin56,252 lines of code in 475 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.12
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
▷ Abstract classes82.54%
▷ Concrete classes30797.46%
▷ Final classes00.00%
▷ Static methods33111.53%
▷ Public methods2,51487.53%
▷ Protected methods29610.31%
▷ Private methods622.16%
▷ Named functions21.34%
▷ Anonymous functions14798.66%
▷ Global constants101.97%
▷ Class constants49898.03%
▷ Public constants498100.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
BaseVersion/assets/jquery-ui/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
BaseVersion/assets/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
BaseVersion/assets/jquery-ui/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
BaseVersion/assets/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
BaseVersion/assets/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%