84% wpb-woocommerce-custom-tab-manager

Code Review | WPB Product Tabs Manager for WooCommerce - Custom Product Tabs - Add Custom Tabs in WooCommerce Product Page

WordPress plugin WPB Product Tabs Manager for WooCommerce - Custom Product Tabs - Add Custom Tabs in WooCommerce Product Page scored 84% from 54 tests.

About plugin

  • Plugin page: wpb-woocommerce-c...
  • Plugin version: 1.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Sep 24, 2023
  • Number of updates: 76
  • Update frequency: every 35.6 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

900+ active / 28,187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.03ms] Passed 4 tests

Server-side resources used by WPB Product Tabs Manager for WooCommerce - Custom Product Tabs - Add Custom Tabs in WooCommerce Product Page
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.05 ▼4.14
Dashboard /wp-admin3.35 ▲0.0545.12 ▼3.36
Posts /wp-admin/edit.php3.46 ▲0.1149.02 ▼0.06
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.10 ▼12.55
Media Library /wp-admin/upload.php3.27 ▲0.0434.12 ▲0.93
Add New Tab /wp-admin/post-new.php?post_type=wpb_wtm_tab3.4050.22
All Tabs /wp-admin/edit.php?post_type=wpb_wtm_tab3.3246.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WPB Product Tabs Manager for WooCommerce - Custom Product Tabs - Add Custom Tabs in WooCommerce Product Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.61 ▼0.801.49 ▼0.1335.08 ▼10.83
Dashboard /wp-admin2,238 ▲505.86 ▲0.0196.59 ▼0.6242.52 ▼1.78
Posts /wp-admin/edit.php2,126 ▲402.12 ▲0.0843.30 ▲3.0041.53 ▲4.04
Add New Post /wp-admin/post-new.php1,565 ▲5123.19 ▲5.63657.99 ▲8.4252.01 ▼18.46
Media Library /wp-admin/upload.php1,423 ▲384.25 ▲0.0796.65 ▼9.7444.29 ▼1.98
Add New Tab /wp-admin/post-new.php?post_type=wpb_wtm_tab3,55420.82696.66136.58
All Tabs /wp-admin/edit.php?post_type=wpb_wtm_tab1,0821.9632.3136.12

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wpb-woocommerce-custom-tab-manager/admin/meta-box/meta_box.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: There are too many tags (22 tag instead of maximum 10)
Please take inspiration from this readme.txt

wpb-woocommerce-custom-tab-manager/main.php 92% from 13 tests

"WPB Product Tabs Manager for WooCommerce - Custom Product Tabs - Add Custom Tabs in WooCommerce Product Page" version 1.2.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpb-woocommerce-custom-tab-manager.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,641 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4194206794
CSS46264715
JavaScript33934132

PHP code Passed 2 tests

This is a very shot review 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.58
Average class complexity21.67
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/meta-box/images/chosen-sprite.png0.55KB0.70KB0.00%
admin/meta-box/images/image.png2.74KB0.10KB▼ 96.43%
admin/meta-box/images/sprite.png6.06KB2.18KB▼ 64.10%