84% wc-custom-product-tab-manager

Code Review | WooCommerce Custom Product Tab Manager

WordPress plugin WooCommerce Custom Product Tab Manager scored84%from 54 tests.

About plugin

  • Plugin page: wc-custom-product...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 6.3.1
  • First release: May 4, 2021
  • Latest release: May 4, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wprealizer (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,103 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼7.83ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Custom Product Tab Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1734.96 ▼3.78
Dashboard /wp-admin3.60 ▲0.2545.23 ▼10.56
Posts /wp-admin/edit.php3.65 ▲0.2945.02 ▼3.22
Add New Post /wp-admin/post-new.php6.14 ▲0.2591.75 ▼13.77
Media Library /wp-admin/upload.php3.46 ▲0.2337.12 ▲6.23

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
_wc_custom_product_tab_manager_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Custom Product Tab Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9814.47 ▲0.101.78 ▼0.1140.45 ▼8.47
Dashboard /wp-admin2,214 ▲265.90 ▲1.03108.47 ▼0.2142.92 ▲1.65
Posts /wp-admin/edit.php2,096 ▲42.04 ▼0.0140.69 ▼2.4937.77 ▲6.64
Add New Post /wp-admin/post-new.php1,531 ▲1423.21 ▲5.64599.81 ▼58.2351.06 ▼1.21
Media Library /wp-admin/upload.php1,399 ▲84.21 ▲0.0399.47 ▼1.2344.94 ▲2.66

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • _wc_custom_product_tab_manager_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-custom-product-tab-manager/templates/product-panel-tab.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wc-custom-product-tab-manager/templates/product-tabs.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wc-custom-product-tab-manager/templates/product-single-tab.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-custom-product-tab-manager/templates/product-single-new-tab.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: product-tabs, product-tab-manager, wc-product-tabs, woocommerce-custom-product-tabs, woocommerce-products-tabs...

wc-custom-product-tab-manager/wc-custom-product-tab-manager.php 92% from 13 tests

The main PHP script in "WooCommerce Custom Product Tab Manager" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.4" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,949 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP212626121,297
CSS3570598
JavaScript211553
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods65
▷ Static methods69.23%
▷ Public methods6295.38%
▷ Protected methods00.00%
▷ Private methods34.62%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin