83% yikes-inc-easy-custom-woocommerce-product-tabs

Code Review | Custom Product Tabs for WooCommerce

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

About plugin

  • Plugin page: yikes-inc-easy-cu...
  • Plugin version: 1.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 16, 2014
  • Latest release: Oct 2, 2023
  • Number of updates: 171
  • Update frequency: every 18.8 days
  • Top authors: yikesitskevin (58.48%)eherman24 (22.22%)fmixell (13.45%)yikesinc (4.68%)liljimmi (2.34%)

Code review

54 tests

User reviews

154 reviews

Install metrics

100,000+ active /1,752,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Custom Product Tabs for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.54 ▼6.31
Dashboard /wp-admin3.31 ▼0.0445.48 ▼20.63
Posts /wp-admin/edit.php3.36 ▲0.0044.39 ▼7.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.94 ▼11.88
Media Library /wp-admin/upload.php3.23 ▲0.0038.10 ▲1.76

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Custom Product Tabs for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.20 ▼0.081.88 ▼0.0141.65 ▲2.24
Dashboard /wp-admin2,195 ▲185.52 ▼0.0285.51 ▼13.1537.56 ▼5.48
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0535.68 ▼4.7136.60 ▲2.76
Add New Post /wp-admin/post-new.php1,528 ▲222.97 ▼0.03681.67 ▲44.0668.89 ▲17.19
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0099.25 ▼6.4842.39 ▼4.84

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/admin/class.export.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/admin/page.premium.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/admin/class.settings.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/admin/page.yikes-woo-saved-tabs.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/admin/class.support.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/admin/class.import.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/admin/page.support.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/public/class.yikes-woo-tabs-display.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/admin/class.yikes-woo-saved-tabs.php:10
    • > PHP Notice
      Undefined variable: new_tab in wp-content/plugins/yikes-inc-easy-custom-woocommerce-product-tabs/admin/page.yikes-woo-saved-tabs-single.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: woocommerce, custom, product, duplicate, tabs...

yikes-inc-easy-custom-woocommerce-product-tabs/yikes-inc-easy-custom-woocommerce-product-tabs.php 77% from 13 tests

"Custom Product Tabs for WooCommerce" version 1.8.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.8" instead of "3.0.0")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages/")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin5,019 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript164393582,507
PHP155886841,593
CSS614160919

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.40
▷ Minimum class complexity4.00
▷ Maximum class complexity77.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods74
▷ Static methods00.00%
▷ Public methods5675.68%
▷ Protected methods1418.92%
▷ Private methods45.41%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.35MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/support-screenshot.png122.15KB39.81KB▼ 67.41%
images/cptpro-saved-tab.png39.35KB16.29KB▼ 58.61%
images/cptpro-bulk-edit.png80.34KB38.12KB▼ 52.55%
images/cptpro-support-form.png43.40KB17.35KB▼ 60.01%
images/cptpro-settings.png71.83KB20.39KB▼ 71.62%