79% custom-tabs-for-products-woocommerce

Code Review | Custom Tabs for Products WooCommerce

WordPress plugin Custom Tabs for Products WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: custom-tabs-for-p...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 11, 2023
  • Latest release: Feb 11, 2023
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: tuyenlaptrinh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /110 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲5.09MB] [CPU: ▲21.26ms] 75% from 4 tests

A check of server-side resources used by Custom Tabs for Products WooCommerce
Please fix the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.09MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.00 ▲5.5477.47 ▲36.92
Dashboard /wp-admin9.02 ▲5.6878.41 ▲13.06
Posts /wp-admin/edit.php9.02 ▲5.6782.25 ▲27.43
Add New Post /wp-admin/post-new.php9.35 ▲3.46126.00 ▲10.57
Media Library /wp-admin/upload.php9.02 ▲5.8071.25 ▲33.97
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius9.0262.19

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 199 new files
Database: no new tables, 10 new options
New WordPress options
fs_accounts
fs_debug_mode
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
fs_gdpr
widget_recent-comments
db_upgraded
fs_active_plugins
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Tabs for Products WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7414.35 ▲0.182.14 ▲0.6130.37 ▼20.55
Dashboard /wp-admin2,241 ▲645.50 ▼0.1398.14 ▲2.8747.03 ▲4.26
Posts /wp-admin/edit.php2,150 ▲502.17 ▲0.1541.65 ▼4.8039.33 ▲0.46
Add New Post /wp-admin/post-new.php1,557 ▲3123.00 ▼0.55662.26 ▼12.8250.35 ▼7.04
Media Library /wp-admin/upload.php1,449 ▲524.25 ▲0.0496.90 ▼0.7243.79 ▼3.70
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0851.6924.4729.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/custom-tabs-for-products-woocommerce/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • fs_gdpr
    • theysaidso_admin_options
    • fs_debug_mode
    • fs_active_plugins
    • fs_accounts
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: tag, wc, custom tab, product tab, tab...

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

"Custom Tabs for Products WooCommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 97% from 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 plugin34,708 lines of code in 150 files:
LanguageFilesBlank linesComment linesLines of code
PHP1318,00917,14333,884
JavaScript43459409
Markdown1680214
CSS1400201

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity86.17
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes11.96%
Methods1,280
▷ Static methods19715.39%
▷ Public methods89870.16%
▷ Protected methods171.33%
▷ Private methods36528.52%
Functions96
▷ Named functions96100.00%
▷ Anonymous functions00.00%
Constants149
▷ Global constants10268.46%
▷ Class constants4731.54%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/wc-conditional-checkout.png23.88KB9.63KB▼ 59.67%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/gpt3-ai-content-generator.png23.88KB9.63KB▼ 59.67%
freemius/assets/img/wc-custom-tabs.png23.88KB9.63KB▼ 59.67%