84% wb-custom-product-tabs-for-woocommerce

Code Review | Custom Product Tabs For WooCommerce

WordPress plugin Custom Product Tabs For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wb-custom-product...
  • Plugin version: 1.1.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Jan 23, 2020
  • Latest release: Nov 19, 2023
  • Number of updates: 23
  • Update frequency: every 60.7 days
  • Top authors: webbuilder143 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /4,801 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Server-side resources used by Custom Product Tabs For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.87 ▲1.37
Dashboard /wp-admin3.31 ▼0.0345.14 ▼12.45
Posts /wp-admin/edit.php3.37 ▲0.0145.70 ▼5.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.90 ▼4.77
Media Library /wp-admin/upload.php3.24 ▲0.0135.33 ▼0.38

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

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

Browser metrics Passed 4 tests

Custom Product Tabs For WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.27 ▼0.011.70 ▲0.0743.78 ▲4.98
Dashboard /wp-admin2,192 ▲155.53 ▼0.1092.24 ▼5.5138.88 ▼5.09
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0040.90 ▲1.1340.95 ▲2.66
Add New Post /wp-admin/post-new.php1,526 ▼023.07 ▲0.06612.29 ▼20.5846.71 ▼16.54
Media Library /wp-admin/upload.php1,391 ▼94.21 ▲0.02101.96 ▲2.6243.63 ▲1.06

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

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 | 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wb-custom-product-tabs-for-woocommerce/admin/partials/wb-custom-product-tabs-for-woocommerce-admin-display.php
    • > /wp-content/plugins/wb-custom-product-tabs-for-woocommerce/public/partials/wb-custom-product-tabs-for-woocommerce-public-display.php

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 28 tag instead of maximum 10
The official readme.txt might help

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

The main file in "Custom Product Tabs For WooCommerce" v. 1.1.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")

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
Success! There were no dangerous files found in this plugin1,384 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP16229707984
JavaScript2450338
CSS23846
XML10016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.12
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods55
▷ Static methods1018.18%
▷ Public methods4683.64%
▷ Protected methods00.00%
▷ Private methods916.36%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected