73% extra-product-options-lite-for-woocommerce

Code Review | Extra Product Options Lite for WooCommerce

WordPress plugin Extra Product Options Lite for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: extra-product-opt...
  • Plugin version: 1.0.0
  • PHP compatiblity: 6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Nov 8, 2022
  • Latest release: Nov 16, 2022
  • Number of updates: 5
  • Update frequency: every 3.8 days
  • Top authors: plugifyofficial (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.30ms] Passed 4 tests

An overview of server-side resources used by Extra Product Options Lite for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.10 ▼4.91
Dashboard /wp-admin3.31 ▼0.0456.26 ▼15.84
Posts /wp-admin/edit.php3.36 ▲0.0049.18 ▼4.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.20 ▼11.47
Media Library /wp-admin/upload.php3.23 ▲0.0032.83 ▼2.58
Import Rules /wp-admin/edit.php?post_type=po_product_options&page=plgfy_i_rules3.0025.09
Export Rules /wp-admin/edit.php?post_type=po_product_options&page=plgfy_e_rules3.0022.07
Product Options /wp-admin/edit.php?post_type=po_product_options3.0427.62

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
already_impoted_rules_plugify_extra
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Extra Product Options Lite for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,444 ▼1,31712.42 ▼1.962.07 ▲0.0243.70 ▼7.10
Dashboard /wp-admin2,183 ▲35.55 ▼0.1494.42 ▼17.3156.18 ▲8.03
Posts /wp-admin/edit.php2,100 ▼02.06 ▲0.0544.54 ▲9.2635.20 ▼1.20
Add New Post /wp-admin/post-new.php1,545 ▲1222.83 ▼0.10634.04 ▲10.4534.02 ▼21.48
Media Library /wp-admin/upload.php1,400 ▲64.22 ▲0.0198.37 ▲0.2844.60 ▲0.05
Import Rules /wp-admin/edit.php?post_type=po_product_options&page=plgfy_i_rules280.440.134.32
Export Rules /wp-admin/edit.php?post_type=po_product_options&page=plgfy_e_rules280.440.094.01
Product Options /wp-admin/edit.php?post_type=po_product_options280.440.074.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • already_impoted_rules_plugify_extra
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% 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)
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/extra-product-options-lite-for-woocommerce/Admin/Supporting_Files/woosppo_create_text_fields_in_meta_box.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/extra-product-options-lite-for-woocommerce/Admin/Supporting_Files/woosppo_applied_on_procat.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/extra-product-options-lite-for-woocommerce/Admin/woosppo_main_admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/extra-product-options-lite-for-woocommerce/Front/all_fields_woosppo.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/extra-product-options-lite-for-woocommerce/Admin/Supporting_Files/plgfyexpo_general_settings_tab_html.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/extra-product-options-lite-for-woocommerce/Admin/Supporting_Files/plugify_customization.php:99
    • > PHP Notice
      Undefined variable: woosppo_post_id in wp-content/plugins/extra-product-options-lite-for-woocommerce/Admin/Supporting_Files/plugify_customization.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/extra-product-options-lite-for-woocommerce/Front/woosppo_main_front.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=po_product_options&page=plgfy_i_rules
    • > Network (severe)
    wp-admin/edit.php?post_type=po_product_options&page=plgfy_i_rules - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=po_product_options&page=plgfy_e_rules
    • > Network (severe)
    wp-admin/edit.php?post_type=po_product_options&page=plgfy_e_rules - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=po_product_options
    • > Network (severe)
    wp-admin/edit.php?post_type=po_product_options - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

extra-product-options-lite-for-woocommerce/extra-product-options-lite-for-woocommerce.php Passed 13 tests

The primary PHP file in "Extra Product Options Lite for WooCommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
106 characters long description:
Create multiple product options using 11 types of fields to sell customized products on your online store.

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
No dangerous file extensions were detected6,895 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP8927333,871
JavaScript44341661,577
CSS684571,447

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
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 complexity59.00
▷ Minimum class complexity25.00
▷ Maximum class complexity115.00
Average method complexity7.69
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Admin/6 (2).png46.58KB20.65KB▼ 55.66%