84% tp-product-tooltip

Code Review | TP Product Tooltip for WooCommerce

WordPress plugin TP Product Tooltip for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: tp-product-tooltip
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 28, 2020
  • Latest release: Dec 31, 2021
  • Number of updates: 15
  • Update frequency: every 32.7 days
  • Top authors: tplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,076 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼3.02ms] Passed 4 tests

Server-side resources used by TP Product Tooltip for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2243.37 ▼3.45
Dashboard /wp-admin3.51 ▲0.2151.58 ▼4.40
Posts /wp-admin/edit.php3.63 ▲0.2753.59 ▲5.63
Add New Post /wp-admin/post-new.php6.11 ▲0.2394.11 ▼8.37
Media Library /wp-admin/upload.php3.44 ▲0.2141.97 ▲4.16

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for TP Product Tooltip for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲19713.60 ▼0.716.10 ▲4.1943.76 ▼1.65
Dashboard /wp-admin2,249 ▲464.92 ▲0.04106.82 ▲0.4437.89 ▼11.41
Posts /wp-admin/edit.php2,131 ▲282.10 ▲0.0438.26 ▼2.8532.78 ▼4.59
Add New Post /wp-admin/post-new.php1,553 ▲2223.46 ▼0.23640.34 ▼7.6768.22 ▲20.95
Media Library /wp-admin/upload.php1,422 ▲194.32 ▲0.15100.55 ▼13.8841.56 ▼6.10

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tp-product-tooltip/admin/partials/tp-woocommerce-product-tooltip-admin-display.php
    • > /wp-content/plugins/tp-product-tooltip/public/partials/tp-woocommerce-product-tooltip-public-display.php

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: woocommerce tooltip, woocommerce product tooltip, tooltip, product tooltip

tp-product-tooltip/tp-product-tooltip.php 85% from 13 tests

The main PHP script in "TP Product Tooltip for WooCommerce" version 1.0.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected6,106 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS6730924,827
PHP132676631,116
SVG10098
JavaScript6208665

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity9.12
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods48
▷ Static methods1225.00%
▷ Public methods4389.58%
▷ Protected methods00.00%
▷ Private methods510.42%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
public/images/tp_play.png6.80KB3.92KB▼ 42.28%
admin/images/tp_tooltip_minicolors.png67.02KB34.31KB▼ 48.80%
admin/images/tp.png1.24KB0.26KB▼ 79.08%