84% product-input-fields-for-woocommerce

Code Review | Product Input Fields for WooCommerce

WordPress plugin Product Input Fields for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: product-input-fie...
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Mar 26, 2017
  • Latest release: Aug 22, 2023
  • Number of updates: 58
  • Update frequency: every 40.3 days
  • Top authors: algoritmika (58.62%)tychesoftwares (43.1%)

Code review

54 tests

User reviews

16 reviews

Install metrics

6,000+ active /99,687 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Product Input Fields for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.90 ▲4.64
Dashboard /wp-admin3.31 ▲0.0045.58 ▼2.46
Posts /wp-admin/edit.php3.36 ▲0.0048.71 ▼3.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.31 ▼6.26
Media Library /wp-admin/upload.php3.23 ▲0.0039.34 ▲3.62

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 158 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Product Input Fields for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.18 ▼0.341.82 ▲0.1743.15 ▼4.00
Dashboard /wp-admin2,192 ▲125.54 ▼0.0686.37 ▼3.7942.36 ▼0.70
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0234.45 ▼5.0232.54 ▼6.62
Add New Post /wp-admin/post-new.php1,533 ▲417.87 ▼5.12631.71 ▼32.5070.11 ▲13.77
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.08110.76 ▲7.3547.24 ▼0.78

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 106× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/AglInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/product-input-fields-for-woocommerce/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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: product addons, fields, woocommerce product fields, product input fields, custom fields

product-input-fields-for-woocommerce/product-input-fields-for-woocommerce.php Passed 13 tests

"Product Input Fields for WooCommerce" version 1.6.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
57 characters long description:
Add custom frontend input fields to WooCommerce products.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin7,351 lines of code in 151 files:
LanguageFilesBlank linesComment linesLines of code
PHP1318471,8665,982
PO File1171186406
JavaScript86052363
Markdown3530278
JSON300263
XML24031
YAML27027
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes123
▷ Abstract classes21.63%
▷ Concrete classes12198.37%
▷ Final classes10.83%
Methods262
▷ Static methods197.25%
▷ Public methods21983.59%
▷ Protected methods3613.74%
▷ Private methods72.67%
Functions18
▷ Named functions1266.67%
▷ Anonymous functions633.33%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin