84% wc-product-subtitle

Code Review | Product Subtitle For WooCommerce

WordPress plugin Product Subtitle For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-product-subtitle
  • Plugin version: 4.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Jan 14, 2016
  • Latest release: May 20, 2022
  • Number of updates: 45
  • Update frequency: every 51.5 days
  • Top authors: varunms (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

6,000+ active /62,373 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.33MB] [CPU: ▼2.97ms] Passed 4 tests

This is a short check of server-side resources used by Product Subtitle For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3338.55 ▼0.70
Dashboard /wp-admin3.63 ▲0.3349.74 ▼0.04
Posts /wp-admin/edit.php3.68 ▲0.3350.66 ▲3.23
Add New Post /wp-admin/post-new.php6.25 ▲0.3787.20 ▼14.35
Media Library /wp-admin/upload.php3.55 ▲0.3337.76 ▲4.14

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Product Subtitle For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.12 ▼0.121.75 ▼0.0942.81 ▼2.00
Dashboard /wp-admin2,189 ▲115.51 ▼0.1981.71 ▼29.4335.39 ▼1.33
Posts /wp-admin/edit.php2,100 ▲31.95 ▼0.0834.40 ▼2.4931.69 ▼2.88
Add New Post /wp-admin/post-new.php1,526 ▼923.44 ▲5.43600.97 ▼48.2377.27 ▼20.60
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.0296.87 ▼4.5542.37 ▼4.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 44× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Varunsridharan\\WordPress\\WP_Conditional_Logic\\Compare' not found in wp-content/plugins/wc-product-subtitle/vendor/varunsridharan/wp-conditional-logic/src/Validators.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/wc-product-subtitle/vendor/wponion/wponion/includes/templates/wp-modern/help_tabs.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/wc-product-subtitle/vendor/wponion/wponion/includes/templates/wp-lite/help_tabs.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vsp_list_log_files() in wp-content/plugins/wc-product-subtitle/vendor/varunsridharan/vsp-framework/views/log-viewer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPOnion\\DB\\Storage\\Base' not found in wp-content/plugins/wc-product-subtitle/vendor/wponion/wponion/core/db/storage/class-comment.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WPOnion\\DB\\Storage\\Base' not found in wp-content/plugins/wc-product-subtitle/vendor/wponion/wponion/core/db/storage/class-user.php:12
    • > PHP Fatal error
      Trait 'WPOnion\\Traits\\Internal\\Unique' not found in wp-content/plugins/wc-product-subtitle/vendor/wponion/wponion/core/abstract/abstract-custom-db-storage-handler.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/wc-product-subtitle/vendor/wponion/wponion/includes/templates/wp-lite/dashboard_widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/wc-product-subtitle/vendor/wponion/wponion/includes/templates/wp/user_profile.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/wc-product-subtitle/vendor/wponion/wponion/includes/templates/wc/widgets.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt might help

wc-product-subtitle/wc-product-subtitle.php 92% from 13 tests

The main PHP script in "Product Subtitle For WooCommerce" version 4.6.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin36,480 lines of code in 490 files:
LanguageFilesBlank linesComment linesLines of code
PHP4676,18021,26536,264
SVG200108
Markdown729090
JSON8008
XML1005
JavaScript3003
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity11.93
▷ Minimum class complexity1.00
▷ Maximum class complexity230.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces70
Interfaces4
Traits41
Classes341
▷ Abstract classes5215.25%
▷ Concrete classes28984.75%
▷ Final classes124.15%
Methods2,448
▷ Static methods2389.72%
▷ Public methods1,69769.32%
▷ Protected methods70228.68%
▷ Private methods492.00%
Functions309
▷ Named functions29996.76%
▷ Anonymous functions103.24%
Constants27
▷ Global constants1762.96%
▷ Class constants1037.04%
▷ Public constants10100.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
52 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/wponion/wponion/assets/img/layouts/100/header/slideout-left-header.png0.63KB0.52KB▼ 17.70%
vendor/wponion/wponion/assets/img/layouts/100/sidebar/dual-sidebar-right.png0.37KB0.17KB▼ 53.72%
vendor/wponion/wponion/assets/img/layouts/75/header/slideout-left-header.png0.65KB0.60KB▼ 8.08%
vendor/wponion/wponion/assets/img/layouts/125/header/logo-left-header.png1.30KB1.07KB▼ 17.31%
vendor/wponion/wponion/assets/img/layouts/125/sidebar/right-sidebar.png0.40KB0.16KB▼ 60.19%