84% woocommerce-product-tabs

Code Review | WooCommerce Product Tabs

WordPress plugin WooCommerce Product Tabs scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 2.0.23
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 4, 2014
  • Latest release: Aug 1, 2023
  • Number of updates: 58
  • Update frequency: every 55.0 days
  • Top authors: wpconcern (60.34%)rabmalin (27.59%)Barn2Media (12.07%)bplv (5.17%)

Code review

54 tests

User reviews

58 reviews

Install metrics

9,000+ active /107,025 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.91ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Product Tabs
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.35 ▼0.61
Dashboard /wp-admin3.31 ▲0.0042.25 ▼7.15
Posts /wp-admin/edit.php3.36 ▲0.0044.32 ▲0.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.85 ▼3.93
Media Library /wp-admin/upload.php3.23 ▲0.0032.98 ▲0.41

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Product Tabs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.181.76 ▲0.0643.68 ▼4.56
Dashboard /wp-admin2,209 ▲245.86 ▲0.94106.41 ▼6.6742.68 ▼3.56
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0040.71 ▲1.8433.57 ▼3.75
Add New Post /wp-admin/post-new.php1,533 ▼023.22 ▼0.02597.46 ▼82.7262.64 ▲9.51
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0596.07 ▼11.0340.76 ▼4.16

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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 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 fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/woocommerce-product-tabs/includes/class-woocmmerce-product-tabs-product-category-walker.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nilambar\\Welcome\\add_action() in wp-content/plugins/woocommerce-product-tabs/vendor/ernilambar/wp-welcome/init.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-product-tabs/admin/admin.php:10

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 22 tag instead of maximum 10
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "WooCommerce Product Tabs" version 2.0.23
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 173 characters long)

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
No dangerous file extensions were detected2,850 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP297611,6582,639
JSON300150
JavaScript211052
CSS2007
Markdown1102

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.43
Average class complexity19.05
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods161
▷ Static methods4226.09%
▷ Public methods13986.34%
▷ Protected methods106.21%
▷ Private methods127.45%
Functions12
▷ Named functions866.67%
▷ Anonymous functions433.33%
Constants16
▷ Global constants1487.50%
▷ Class constants212.50%
▷ Public constants2100.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