89% wc-product-custom-tab

Code Review | WooCommerce Product Custom Tab

WordPress plugin WooCommerce Product Custom Tab scored89%from 54 tests.

About plugin

  • Plugin page: wc-product-custom...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2013
  • Latest release: Dec 25, 2013
  • Number of updates: 7
  • Update frequency: every 4.4 days
  • Top authors: sunita121981 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,071 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.73ms] Passed 4 tests

Server-side resources used by WooCommerce Product Custom Tab
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.70 ▼1.45
Dashboard /wp-admin3.33 ▲0.0245.17 ▼2.48
Posts /wp-admin/edit.php3.38 ▲0.0242.98 ▼5.60
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.18 ▼8.99
Media Library /wp-admin/upload.php3.25 ▲0.0233.36 ▼1.83

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

WooCommerce Product Custom Tab: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.191.68 ▲0.1140.58 ▼1.15
Dashboard /wp-admin2,209 ▲184.85 ▼1.05105.04 ▲5.0939.69 ▼4.79
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0337.72 ▲0.7033.07 ▲2.14
Add New Post /wp-admin/post-new.php1,536 ▲2223.32 ▲5.75636.22 ▼46.7159.06 ▼9.79
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0397.99 ▼5.1742.17 ▼0.72

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
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Install plugin), #2 (add custom tabs in product)
Please take inspiration from this readme.txt

wc-product-custom-tab/WC-product-custom-tab.php 85% from 13 tests

The main PHP script in "WooCommerce Product Custom Tab" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-product-custom-tab.php" instead of "WC-product-custom-tab.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)

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
Success! There were no dangerous files found in this plugin119 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15121119

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ 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
No PNG images were found in this plugin