77% ibtana-ecommerce-product-addons

Code Review | Ibtana - Ecommerce Product Addons

WordPress plugin Ibtana - Ecommerce Product Addons scored77%from 54 tests.

About plugin

  • Plugin page: ibtana-ecommerce-...
  • Plugin version: 0.4.5.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 19, 2021
  • Latest release: Oct 28, 2023
  • Number of updates: 88
  • Update frequency: every 10.8 days
  • Top authors: vowelweb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

7,000+ active /246,738 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.43MB] [CPU: ▼104.91ms] Passed 4 tests

Analyzing server-side resources used by Ibtana - Ecommerce Product Addons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5052.70 ▲15.39
Dashboard /wp-admin4.76 ▲1.3352.52 ▼453.76
Posts /wp-admin/edit.php4.81 ▲1.4558.84 ▲6.30
Add New Post /wp-admin/post-new.php7.48 ▲1.59105.30 ▲18.08
Media Library /wp-admin/upload.php4.68 ▲1.4546.62 ▲12.43
Get Started /wp-admin/tools.php?page=ibtanaecommerceproductaddons-setup4.6544.35
Install Plugins /wp-admin/plugins.php?page=iepa-tgmpa-install-plugins4.7939.77

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 244 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ibtana - Ecommerce Product Addons
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲21014.15 ▼0.169.96 ▲8.3140.40 ▲1.72
Dashboard /wp-admin2,243 ▲665.80 ▲0.1588.39 ▲4.1242.28 ▲4.84
Posts /wp-admin/edit.php2,151 ▲482.41 ▲0.4343.55 ▲7.5336.09 ▲0.12
Add New Post /wp-admin/post-new.php1,700 ▲17424.16 ▲0.61635.55 ▼31.0337.06 ▼10.12
Media Library /wp-admin/upload.php1,448 ▲484.49 ▲0.22124.84 ▲13.9456.47 ▲10.36
Get Started /wp-admin/tools.php?page=ibtanaecommerceproductaddons-setup1,0952.1143.6480.08
Install Plugins /wp-admin/plugins.php?page=iepa-tgmpa-install-plugins1,0642.0527.2129.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 38× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/backend/save_settings.php
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/admin/menu_settings_class.php
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/backend/menu_settings/top_menu/mega_menu_settings.php
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/backend/menu_settings/top_menu/megamenu_settings.php
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/backend/metabox_field/add_metabox_field.php
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/backend/activation.php
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/inc/tpl/admin-template-picker.php
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/backend/menu_settings/top_menu/custom_styling.php
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/admin/class-dynamic-css.php
    • > /wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/backend/iepa_mm_search_shortcode.php
  • 36× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/ibtana-ecommerce-product-addons/inc/tpl/iepa-single-product.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Ibtana_Visual_Editor_Menu_Creator' not found in wp-content/plugins/ibtana-ecommerce-product-addons/iepa_submenu.php:5
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/frontend/generated_css/custom_theme_css.php on line 207
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/frontend/generated_css/dynamic_css.php:133
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/frontend/generated_css/dynamic_css.php on line 81
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_registered_nav_menus() in wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/frontend/generated_css/extra_css.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/frontend/generated_css/custom_theme_css.php:214
    • > PHP Notice
      Undefined variable: orientation in wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/frontend/generated_css/dynamic_css.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/ibtana-ecommerce-product-addons/IEPA_Whizzie/iepa_tgmpa/iepa-class-tgm-plugin-activation.php:2109
    • > PHP Notice
      Undefined variable: location_key in wp-content/plugins/ibtana-ecommerce-product-addons/addons/ibtana-mega-menu/inc/frontend/generated_css/dynamic_css.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% 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: The official readme.txt is a good inspiration

ibtana-ecommerce-product-addons/plugin.php 69% from 13 tests

The principal PHP file in "Ibtana - Ecommerce Product Addons" v. 0.4.5.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "5.2")
  • Description: The description should be shorter than 140 characters (currently 425 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ibtana-ecommerce-product-addons.php" instead of "plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin74,595 lines of code in 175 files:
LanguageFilesBlank linesComment linesLines of code
PHP933,9633,68027,287
CSS383,0301,47323,330
JavaScript362,9102,38017,712
SVG80126,266

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 328)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity64.65
▷ Minimum class complexity1.00
▷ Maximum class complexity374.00
Average method complexity7.79
▷ Minimum method complexity1.00
▷ Maximum method complexity328.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes00.00%
▷ Concrete classes48100.00%
▷ Final classes510.42%
Methods447
▷ Static methods9521.25%
▷ Public methods41793.29%
▷ Protected methods235.15%
▷ Private methods71.57%
Functions13
▷ Named functions753.85%
▷ Anonymous functions646.15%
Constants37
▷ Global constants3491.89%
▷ Class constants38.11%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
37 PNG files occupy 0.90MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
IEPA_Whizzie/assets/img/ibtana-mega-menu-display-image.png131.12KB48.48KB▼ 63.03%
IEPA_Whizzie/assets/img/ibtana-ecommerce-product-addon-display-image.png58.90KB22.86KB▼ 61.19%
addons/ibtana-mega-menu/images/mega_menu_images/flyout-right.PNG2.68KB2.19KB▼ 18.50%
addons/ibtana-mega-menu/images/widget-images/postlayout5.PNG70.01KB18.54KB▼ 73.52%
addons/ibtana-mega-menu/css/images/loading_background.png0.13KB0.15KB0.00%