84% supplier-data-fields-for-wc

Code Review | Supplier Data Fields for WooCommerce

WordPress plugin Supplier Data Fields for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: supplier-data-fie...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9.3
  • WordPress version: 6.3.1
  • First release: Feb 28, 2020
  • Latest release: May 19, 2022
  • Number of updates: 13
  • Update frequency: every 62.4 days
  • Top authors: jsherk (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,314 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▲1.70ms] Passed 4 tests

A check of server-side resources used by Supplier Data Fields for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0848.06 ▲8.01
Dashboard /wp-admin3.38 ▲0.0846.94 ▼3.24
Posts /wp-admin/edit.php3.43 ▲0.0745.36 ▲0.07
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.38 ▲9.85
Media Library /wp-admin/upload.php3.30 ▲0.0735.41 ▲1.96
Supplier Data Fields for WC /wp-admin/options-general.php?page=supplier-data-fields-for-wc3.2632.93

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
jdssdf_options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Supplier Data Fields for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.30 ▼1.071.76 ▼0.1743.07 ▼7.59
Dashboard /wp-admin2,210 ▲194.87 ▼0.03112.82 ▲9.1238.55 ▼6.77
Posts /wp-admin/edit.php2,096 ▲71.97 ▼0.0438.83 ▲5.1834.11 ▼3.56
Add New Post /wp-admin/post-new.php1,523 ▲423.21 ▲0.08663.03 ▼19.1765.99 ▲13.91
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0593.30 ▼0.3040.43 ▼5.48
Supplier Data Fields for WC /wp-admin/options-general.php?page=supplier-data-fields-for-wc9472.0528.5733.07

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • jdssdf_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/supplier-data-fields-for-wc/supplier-data-fields-for-wc.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: data, products, supplier, custom, fields...

supplier-data-fields-for-wc/supplier-data-fields-for-wc.php Passed 13 tests

The primary PHP file in "Supplier Data Fields for WooCommerce" version 1.0.5 is used by WordPress to initiate all plugin functionality
65 characters long description:
Adds supplier fields to the product data section of each product.

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
There were no executable files found in this plugin489 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111541489

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
stars-small.png1.50KB1.51KB0.00%
dbut.png13.46KB6.06KB▼ 55.01%
dbut-small.png5.33KB2.67KB▼ 49.92%