78% flexible-product-fields

Code Review | Flexible Product Fields (WooCommerce Product Addons) - WooCommerce Product Page Editor

WordPress plugin Flexible Product Fields (WooCommerce Product Addons) - WooCommerce Product Page Editor scored78%from 54 tests.

About plugin

  • Plugin page: flexible-product-...
  • Plugin version: 2.3.14
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Feb 22, 2017
  • Latest release: Nov 7, 2023
  • Number of updates: 198
  • Update frequency: every 12.4 days
  • Top authors: wpdesk (79.29%)jablonowski (21.21%)

Code review

54 tests

User reviews

81 reviews

Install metrics

10,000+ active /365,811 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.44MB] [CPU: ▼6.05ms] Passed 4 tests

Analyzing server-side resources used by Flexible Product Fields (WooCommerce Product Addons) - WooCommerce Product Page Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4541.61 ▼1.13
Dashboard /wp-admin3.75 ▲0.4451.68 ▲1.15
Posts /wp-admin/edit.php3.80 ▲0.4449.39 ▼3.51
Add New Post /wp-admin/post-new.php6.33 ▲0.4488.01 ▼20.70
Media Library /wp-admin/upload.php3.67 ▲0.4436.41 ▲2.61

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 515 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
plugin_activation_flexible-product-fields/flexible-product-fields.php

Browser metrics Passed 4 tests

An overview of browser requirements for Flexible Product Fields (WooCommerce Product Addons) - WooCommerce Product Page Editor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4614.29 ▼0.051.55 ▼0.2138.41 ▼5.41
Dashboard /wp-admin2,195 ▲155.49 ▼0.1686.69 ▼4.7837.58 ▼0.39
Posts /wp-admin/edit.php2,103 ▼01.95 ▲0.0140.35 ▲0.3934.01 ▲0.53
Add New Post /wp-admin/post-new.php1,528 ▲223.43 ▲0.42671.90 ▼2.7854.57 ▲2.70
Media Library /wp-admin/upload.php1,403 ▼04.23 ▲0.0297.33 ▼7.1341.87 ▼4.45

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • plugin_activation_flexible-product-fields/flexible-product-fields.php
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/flexible-product-fields/templates/totals/display.php
  • 287× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'VendorFPF\\Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/flexible-product-fields/vendor_prefixed/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FPF\\Free\\Field\\Type\\TypeAbstract' not found in wp-content/plugins/flexible-product-fields/src/Field/Type/DateType.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'VendorFPF\\WPDesk\\Composer\\Codeception\\Commands\\RunCodeceptionTests' not found in wp-content/plugins/flexible-product-fields/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunLocalCodeceptionTestsWithCoverage.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FPF\\Free\\Settings\\Option\\OptionAbstract' not found in wp-content/plugins/flexible-product-fields/src/Settings/Option/PricingAdvOption.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FPF\\Free\\Settings\\Tab\\TabAbstract' not found in wp-content/plugins/flexible-product-fields/src/Settings/Tab/AdvancedTab.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FPF\\Free\\Settings\\Option\\OptionAbstract' not found in wp-content/plugins/flexible-product-fields/src/Settings/Option/SelectedMaxOption.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FPF\\Free\\Settings\\Option\\OptionAbstract' not found in wp-content/plugins/flexible-product-fields/src/Settings/Option/ValueStepOption.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'VendorFPF\\Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface' not found in wp-content/plugins/flexible-product-fields/vendor_prefixed/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'VendorFPF\\Monolog\\Formatter\\JsonFormatter' not found in wp-content/plugins/flexible-product-fields/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\FPF\\Free\\Settings\\Tab\\TabAbstract' not found in wp-content/plugins/flexible-product-fields/src/Settings/Tab/GeneralTab.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: woocommerce custom fields, woocommerce product addons, woocommerce product options, woocommerce customize product, woocommerce custom product

flexible-product-fields/flexible-product-fields.php 92% from 13 tests

The entry point to "Flexible Product Fields (WooCommerce Product Addons) - WooCommerce Product Page Editor" version 2.3.14 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.7" instead of "5.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin23,147 lines of code in 500 files:
LanguageFilesBlank linesComment linesLines of code
PHP4552,45013,15421,481
JSON1700880
JavaScript13435418
CSS9385220
Markdown415065
SVG10058
PO File13325

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces56
Interfaces45
Traits12
Classes343
▷ Abstract classes164.66%
▷ Concrete classes32795.34%
▷ Final classes61.83%
Methods2,037
▷ Static methods864.22%
▷ Public methods1,66781.84%
▷ Protected methods1929.43%
▷ Private methods1788.74%
Functions81
▷ Named functions3441.98%
▷ Anonymous functions4758.02%
Constants249
▷ Global constants31.20%
▷ Class constants24698.80%
▷ Public constants21989.02%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/flexible-wishlist.png12.35KB5.49KB▼ 55.55%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/flexibleshipping.com.png5.63KB3.68KB▼ 34.58%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/logo.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/wpdesk.pl.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/octolize.com.png88.91KB39.07KB▼ 56.06%