83% yith-woocommerce-tab-manager

Code Review | YITH WooCommerce Tab Manager

WordPress plugin YITH WooCommerce Tab Manager scored83%from 54 tests.

About plugin

  • Plugin page: yith-woocommerce-...
  • Plugin version: 1.29.0
  • PHP version: 7.4.16
  • WordPress compatibility: 8.1-6.4
  • WordPress version: 6.3.1
  • First release: Mar 30, 2015
  • Latest release: Nov 10, 2023
  • Number of updates: 163
  • Update frequency: every 19.4 days
  • Top authors: yithemes (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

30,000+ active /212,901 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by YITH WooCommerce Tab Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.85 ▼3.95
Dashboard /wp-admin3.33 ▼0.0243.40 ▼15.21
Posts /wp-admin/edit.php3.38 ▲0.0245.37 ▲2.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.69 ▼2.13
Media Library /wp-admin/upload.php3.25 ▲0.0233.46 ▲1.40

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for YITH WooCommerce Tab Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲2414.07 ▼0.281.97 ▲0.0241.48 ▼0.39
Dashboard /wp-admin2,201 ▲205.57 ▼0.1388.62 ▼16.7838.46 ▼2.09
Posts /wp-admin/edit.php2,107 ▲71.97 ▲0.0235.80 ▼1.4334.56 ▼0.95
Add New Post /wp-admin/post-new.php1,532 ▲623.15 ▲0.18612.44 ▲18.5745.48 ▼17.23
Media Library /wp-admin/upload.php1,403 ▲64.21 ▼0.12101.72 ▼2.5742.47 ▼1.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/yith-woocommerce-tab-manager/templates/admin/premium.php:112
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpautop() in wp-content/plugins/yith-woocommerce-tab-manager/templates/default.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yith-woocommerce-tab-manager/includes/metabox/tab-metabox.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
  • Screenshots: A description for screenshot #3 is required in yith-woocommerce-tab-manager/assets to your readme.txt
  • Screenshots: Screenshot #5 (Product Page: my first extra tab in frontend) image missing
The official readme.txt might help

yith-woocommerce-tab-manager/init.php 77% from 13 tests

The primary PHP file in "YITH WooCommerce Tab Manager" version 1.29.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 216 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("6.2" instead of "8.1")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("yith-woocommerce-tab-manager.php" instead of "init.php")

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
There were no executable files found in this plugin41,105 lines of code in 252 files:
LanguageFilesBlank linesComment linesLines of code
PHP1722,7475,54715,368
JavaScript451,3048229,237
CSS191,6722449,222
PO File61,5661,9204,307
SVG8012,926
XML212945

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity40.35
▷ Minimum class complexity1.00
▷ Maximum class complexity336.00
Average method complexity3.99
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes13.23%
▷ Concrete classes3096.77%
▷ Final classes00.00%
Methods395
▷ Static methods5313.42%
▷ Public methods31980.76%
▷ Protected methods5614.18%
▷ Private methods205.06%
Functions142
▷ Named functions13494.37%
▷ Anonymous functions85.63%
Constants17
▷ Global constants1694.12%
▷ Class constants15.88%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
48 PNG files occupy 0.41MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin-fw/assets/css/jquery-ui/images/ui-icons_888888_256x240.png3.69KB4.18KB0.00%
plugin-fw/assets/images/licence-error.png1.61KB0.94KB▼ 41.62%
assets/images/04.png67.03KB23.76KB▼ 64.56%
plugin-fw/assets/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
assets/images/02-bg.png7.18KB3.67KB▼ 48.86%