84% mipl-wc-checkout-fields

Code Review | MIPL WC Checkout Fields

WordPress plugin MIPL WC Checkout Fields scored84%from 54 tests.

About plugin

  • Plugin page: mipl-wc-checkout-...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4.1
  • WordPress version: 6.3.1
  • First release: May 12, 2023
  • Latest release: Nov 23, 2023
  • Number of updates: 21
  • Update frequency: every 9.7 days
  • Top authors: mulika (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /412 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.43MB] [CPU: ▼5.14ms] Passed 4 tests

Analyzing server-side resources used by MIPL WC Checkout Fields
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4837.33 ▼13.04
Dashboard /wp-admin3.72 ▲0.4246.78 ▼5.77
Posts /wp-admin/edit.php3.84 ▲0.4846.86 ▼3.03
Add New Post /wp-admin/post-new.php6.30 ▲0.4296.23 ▲1.60
Media Library /wp-admin/upload.php3.65 ▲0.4235.73 ▲1.29

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for MIPL WC Checkout Fields
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲19813.82 ▼0.5211.81 ▲9.3235.75 ▼15.53
Dashboard /wp-admin2,209 ▲295.62 ▼0.0990.87 ▼8.3443.47 ▼0.99
Posts /wp-admin/edit.php2,111 ▲111.98 ▲0.0339.92 ▲1.9234.90 ▼0.53
Add New Post /wp-admin/post-new.php1,531 ▲523.03 ▼0.37643.58 ▲5.3350.07 ▼1.79
Media Library /wp-admin/upload.php1,405 ▲54.19 ▲0.0499.11 ▲0.8044.75 ▲3.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/mipl-wc-checkout-fields/view/mipl-wc-checkout-order-placed-data.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mipl-wc-checkout-fields/view/mipl-wc-cf-setting-fields.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/mipl-wc-checkout-fields/view/mipl-wc-cf-checkout-setting.php:2
    • > PHP Notice
      Undefined variable: order in wp-content/plugins/mipl-wc-checkout-fields/view/mipl-wc-checkout-order-placed-data.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/mipl-wc-checkout-fields/view/mipl-wc-checkout-custom_field.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/mipl-wc-checkout-fields/view/mipl-wc-checkout-order-placed-data.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/mipl-wc-checkout-fields/view/mipl-wc-checkout-group-setting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/mipl-wc-checkout-fields/mipl-wc-checkout-fields.php:34

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Add new Checkout Fields Group.), #2 (Checkout Fields Groups Listing.), #3 (Checkout Default Fields.), #4 (Fields Group on Checkout Page.), #5 (Fields Group Repeat by Quantity on Checkout Page.), #6 (Fields Details in Order Edit Page.), #7 (Fields Details in Order Email.)
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

mipl-wc-checkout-fields/mipl-wc-checkout-fields.php Passed 13 tests

The main file in "MIPL WC Checkout Fields" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
102 characters long description:
Customize WooCommerce Checkout Fields, Create Group of custom fields & Update default checkout fields.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin6,654 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP128001093,433
JavaScript6751592,721
Markdown31100408
CSS4111792

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity59.40
▷ Minimum class complexity7.00
▷ Maximum class complexity115.00
Average method complexity6.41
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods54
▷ Static methods00.00%
▷ Public methods54100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin