84% custom-product-tabs-for-woocommerce

Code Review | Extra Custom Product Tabs for WooCommerce

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

About plugin

  • Plugin page: custom-product-ta...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 11, 2021
  • Latest release: Jul 31, 2021
  • Number of updates: 5
  • Update frequency: every 10.2 days
  • Top authors: pradeepku041 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /581 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: ▼6.85ms] Passed 4 tests

A check of server-side resources used by Extra Custom Product Tabs for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.97 ▼4.58
Dashboard /wp-admin3.31 ▲0.0045.97 ▼7.86
Posts /wp-admin/edit.php3.36 ▲0.0048.95 ▲2.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.16 ▼10.84
Media Library /wp-admin/upload.php3.23 ▲0.0031.36 ▼4.12

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

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

Browser metrics Passed 4 tests

Extra Custom Product Tabs for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.34 ▼0.012.17 ▲0.2838.79 ▼6.94
Dashboard /wp-admin2,195 ▲185.61 ▲0.0582.27 ▼17.8041.46 ▼1.49
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0240.07 ▲3.2738.42 ▼1.05
Add New Post /wp-admin/post-new.php1,536 ▲17023.45 ▲6.76659.91 ▲44.7255.88 ▲6.90
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0497.52 ▼5.7245.93 ▼0.77

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/custom-product-tabs-for-woocommerce/wpcc-custom-product-tab.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: woocommerce, add more extra product tabs, product tabs manager for woocommerce, product tabs, woocommerce custom produuct tabs...

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

"Extra Custom Product Tabs for WooCommerce" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-product-tabs-for-woocommerce.php" instead of "wpcc-custom-product-tab.php")

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 plugin255 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38420210
CSS11032
JavaScript12013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
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