83% tp-show-product-images-on-checkout-page-for-woocommerce

Code Review | TP Show Product Images on Checkout Page for WooCommerce

WordPress plugin TP Show Product Images on Checkout Page for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: tp-show-product-i...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 1, 2021
  • Latest release: Nov 2, 2023
  • Number of updates: 9
  • Update frequency: every 84.7 days
  • Top authors: tplugins (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /1,740 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.04MB] [CPU: ▼9.44ms] Passed 4 tests

This is a short check of server-side resources used by TP Show Product Images on Checkout Page for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.81 ▼0.84
Dashboard /wp-admin3.36 ▲0.0145.83 ▼19.39
Posts /wp-admin/edit.php3.41 ▲0.0545.65 ▲0.35
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.69 ▼17.87
Media Library /wp-admin/upload.php3.29 ▲0.0536.12 ▲3.75

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TP Show Product Images on Checkout Page for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.25 ▼0.471.75 ▲0.0336.05 ▼7.95
Dashboard /wp-admin2,209 ▲285.63 ▼0.0884.48 ▼16.5667.17 ▲28.89
Posts /wp-admin/edit.php2,099 ▼12.04 ▲0.0138.07 ▼1.9534.76 ▼0.24
Add New Post /wp-admin/post-new.php1,550 ▲2218.25 ▼4.67620.51 ▼55.51132.96 ▲81.99
Media Library /wp-admin/upload.php1,417 ▲174.42 ▲0.23103.77 ▲4.7464.60 ▲22.67

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 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)
Good news, no errors were detected

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 items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp-show-product-images-on-checkout-page-for-woocommerce/admin/tp-show-product-images-on-checkout-page-admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tp-show-product-images-on-checkout-page-for-woocommerce/public/tp-show-product-images-on-checkout-page-public.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

tp-show-product-images-on-checkout-page-for-woocommerce/tp-show-product-images-on-checkout-page.php 69% from 13 tests

The entry point to "TP Show Product Images on Checkout Page for WooCommerce" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • 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
  • Main file name: Name the main plugin file the same as the plugin slug ("tp-show-product-images-on-checkout-page-for-woocommerce.php" instead of "tp-show-product-images-on-checkout-page.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "4.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin863 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS14025609
PHP48672242
JavaScript1666
XML1006

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
admin/images/tp.png1.24KB0.26KB▼ 79.08%