84% tp-product-quick-view-for-woocommerce

Code Review | TP Product Quick View for Woocommerce

WordPress plugin TP Product Quick View for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: tp-product-quick-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2021
  • Latest release: Nov 1, 2023
  • Number of updates: 5
  • Update frequency: every 189.8 days
  • Top authors: tplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,552 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼0.28ms] Passed 4 tests

An overview of server-side resources used by TP Product Quick View for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.61 ▼2.15
Dashboard /wp-admin3.48 ▲0.1747.12 ▲2.06
Posts /wp-admin/edit.php3.59 ▲0.2351.96 ▲0.09
Add New Post /wp-admin/post-new.php6.08 ▲0.1993.36 ▼0.53
Media Library /wp-admin/upload.php3.40 ▲0.1737.79 ▲1.48

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 44 new options
New WordPress options
tppqw_title_background
tppqw_infinite_loop
tppqw_sale_font_size
can_compress_scripts
tppqw_sale_background
tppqw_more_details_label
tppqw_title_color
tppqw_product_fields_to_show
widget_recent-posts
tppqw_share_buttons
...

Browser metrics Passed 4 tests

A check of browser resources used by TP Product Quick View for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15613.54 ▼0.829.17 ▲7.4737.24 ▼8.59
Dashboard /wp-admin2,204 ▲305.67 ▲0.0083.74 ▼12.0577.36 ▲37.00
Posts /wp-admin/edit.php2,124 ▲242.19 ▲0.2438.97 ▲5.3837.52 ▲1.46
Add New Post /wp-admin/post-new.php1,554 ▲2818.50 ▼4.57628.54 ▼84.1355.72 ▼2.28
Media Library /wp-admin/upload.php1,418 ▲214.38 ▲0.16103.81 ▲0.4773.44 ▲28.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp-product-quick-view-for-woocommerce/admin/partials/tp-product-quick-view-for-woocommerce-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/tp-product-quick-view-for-woocommerce/public/partials/tp-product-quick-view-for-woocommerce-public-display.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: quick view, product quick view, woocommerce product quick view, product quick view for woocommerce

tp-product-quick-view-for-woocommerce/tp-product-quick-view-for-woocommerce.php 92% from 13 tests

The main PHP script in "TP Product Quick View for Woocommerce" version 1.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.5" instead of "3.5")

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 detected2,193 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP123235561,312
CSS46634854
JavaScript4131427

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions11
▷ Named functions11100.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
4 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/tp.png1.24KB0.26KB▼ 79.08%
admin/partials/images/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
admin/partials/images/tp.png1.24KB0.26KB▼ 79.08%
admin/images/jquery.minicolors.png67.02KB34.31KB▼ 48.80%