83% product-total-price-for-woocommerce

Code Review | Product Total Price for WooCommerce

WordPress plugin Product Total Price for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: product-total-pri...
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2021
  • Latest release: Apr 10, 2023
  • Number of updates: 16
  • Update frequency: every 46.2 days
  • Top authors: autocircle (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,332 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.16MB] [CPU: ▼20.66ms] Passed 4 tests

An overview of server-side resources used by Product Total Price for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.22 ▲0.34
Dashboard /wp-admin3.21 ▼0.1330.07 ▼32.43
Posts /wp-admin/edit.php3.28 ▼0.0731.09 ▼14.93
Add New Post /wp-admin/post-new.php5.45 ▼0.4367.91 ▼28.68
Media Library /wp-admin/upload.php3.22 ▼0.0131.04 ▼6.59

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Product Total Price for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.45 ▼0.082.09 ▲0.2141.75 ▼1.32
Dashboard /wp-admin2,192 ▲145.72 ▲0.1192.21 ▼23.1939.27 ▼3.59
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0133.73 ▼2.3735.42 ▲1.76
Add New Post /wp-admin/post-new.php1,526 ▼223.22 ▲0.09654.32 ▼6.6869.22 ▲10.04
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0297.97 ▼4.7341.54 ▼0.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/product-total-price-for-woocommerce/init.php
    • > /wp-content/plugins/product-total-price-for-woocommerce/includes/functions.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

product-total-price-for-woocommerce/init.php 69% from 13 tests

The main PHP file in "Product Total Price for WooCommerce" ver. 1.1.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "4.0.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("product-total-price-for-woocommerce.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected364 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23125211
PHP44357153

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods233.33%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin