78% dn-wc-extra-fields

Code Review | DN Checkout Extra Fields

WordPress plugin DN Checkout Extra Fields scored78%from 54 tests.

About plugin

  • Plugin page: dn-wc-extra-fields
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 27, 2020
  • Latest release: Apr 5, 2023
  • Number of updates: 8
  • Update frequency: every 107.5 days
  • Top authors: digireturn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /653 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.38ms] Passed 4 tests

A check of server-side resources used by DN Checkout Extra Fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.98 ▼3.58
Dashboard /wp-admin3.41 ▲0.1150.08 ▲1.57
Posts /wp-admin/edit.php3.53 ▲0.1751.04 ▲4.89
Add New Post /wp-admin/post-new.php5.99 ▲0.1195.57 ▲1.44
Media Library /wp-admin/upload.php3.34 ▲0.1134.28 ▲2.10
Checkout Extra Fields /wp-admin/admin.php?page=dn_checkout_extra_fields_manage3.3030.24

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

DN Checkout Extra Fields: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.26 ▼1.122.00 ▲0.2645.30 ▲0.67
Dashboard /wp-admin2,208 ▲174.80 ▼1.13107.56 ▲6.1842.97 ▼2.73
Posts /wp-admin/edit.php2,091 ▲22.04 ▲0.0239.49 ▲4.4634.29 ▼2.47
Add New Post /wp-admin/post-new.php1,515 ▼1822.72 ▲1.13632.54 ▼58.7848.97 ▲2.47
Media Library /wp-admin/upload.php1,387 ▼14.13 ▼0.0594.77 ▼13.6447.40 ▲1.39
Checkout Extra Fields /wp-admin/admin.php?page=dn_checkout_extra_fields_manage7672.1733.5525.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dn-wc-extra-fields/dn-checkout-extra-fields.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dn-wc-extra-fields/includes/about.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
5 plugin tags: codice fiscale, custom field, partita iva, checkout field, woocommerce

dn-wc-extra-fields/dn-checkout-extra-fields.php 85% from 13 tests

The main PHP script in "DN Checkout Extra Fields" version 1.0.3 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: The principal plugin file should be the same as the plugin slug ("dn-wc-extra-fields.php" instead of "dn-checkout-extra-fields.php")

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
Everything looks great! No dangerous files found in this plugin457 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3724326
PO File19214399
CSS16032

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/action-delete.png5.63KB0.49KB▼ 91.25%
images/action-edit.png5.84KB0.48KB▼ 91.70%