83% product-tabs-manager-for-woocommerce

Code Review | Product Tabs Manager for WooCommerce

WordPress plugin Product Tabs Manager for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: product-tabs-mana...
  • Plugin version: 1.1.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 15, 2016
  • Latest release: Sep 21, 2023
  • Number of updates: 68
  • Update frequency: every 38.2 days
  • Top authors: RazyRx (60.29%)dholovnia (41.18%)

Code review

54 tests

User reviews

37 reviews

Install metrics

2,000+ active /50,291 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.16MB] [CPU: ▲7.21ms] Passed 4 tests

Server-side resources used by Product Tabs Manager for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.64 ▲1.1847.96 ▲2.85
Dashboard /wp-admin4.47 ▲1.1659.60 ▲7.95
Posts /wp-admin/edit.php4.58 ▲1.2260.86 ▲12.09
Add New Post /wp-admin/post-new.php7.05 ▲1.1694.13 ▲5.94
Media Library /wp-admin/upload.php4.39 ▲1.1653.75 ▲18.79

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 87 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
br-tab_manager-options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
berocket_admin_notices_rate_stars
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Product Tabs Manager for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.27 ▼1.035.34 ▲3.4737.17 ▼11.53
Dashboard /wp-admin2,211 ▲234.84 ▼0.06107.19 ▼9.7175.30 ▲29.81
Posts /wp-admin/edit.php2,106 ▲172.04 ▲0.0136.79 ▲0.5232.96 ▼0.68
Add New Post /wp-admin/post-new.php1,547 ▲1318.34 ▼4.79695.64 ▼23.7664.37 ▲11.24
Media Library /wp-admin/upload.php1,405 ▲174.19 ▼0.02109.81 ▲5.1348.17 ▲4.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • berocket_admin_notices_rate_stars
    • db_upgraded
    • berocket_key_activated_plugins
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please take a closer look at the following
  • 27× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: framework_version in wp-content/plugins/product-tabs-manager-for-woocommerce/berocket/framework_version.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-tabs-manager-for-woocommerce/berocket/framework.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-tabs-manager-for-woocommerce/berocket/libraries/popup.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-tabs-manager-for-woocommerce/berocket/libraries/tippy.php:7
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/product-tabs-manager-for-woocommerce/templates/tabs.php on line 49
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/product-tabs-manager-for-woocommerce/templates/tabs.php on line 16
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/product-tabs-manager-for-woocommerce/templates/tabs.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/product-tabs-manager-for-woocommerce/berocket/includes/settings_fields.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/product-tabs-manager-for-woocommerce/berocket/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/product-tabs-manager-for-woocommerce/berocket/includes/updater.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (19 tag instead of maximum 10)
  • Screenshots: Add images for these screenshots: #1 (General settings), #2 (Tabs list), #3 (Tab creation)
Please take inspiration from this readme.txt

product-tabs-manager-for-woocommerce/woocommerce-tab-manager.php 92% from 13 tests

The main file in "Product Tabs Manager for WooCommerce" v. 1.1.5.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("product-tabs-manager-for-woocommerce.php" instead of "woocommerce-tab-manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected20,582 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
CSS142,517769,757
PHP374731,3038,661
JavaScript543581,705
PO File2194216430
XML10029

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity48.18
▷ Minimum class complexity1.00
▷ Maximum class complexity240.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods366
▷ Static methods13436.61%
▷ Public methods366100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
berocket/libraries/templates/default.png3.87KB2.63KB▼ 31.94%
berocket/assets/css/mail.png2.59KB1.92KB▼ 26.02%
berocket/libraries/addons/default.png3.87KB2.63KB▼ 31.94%
berocket/assets/images/submenu-icon.png0.62KB0.50KB▼ 20.13%
berocket/includes/ico.png1.90KB1.41KB▼ 25.89%