89% woo-price-display

Code Review | Woocommerce Price Display

WordPress plugin Woocommerce Price Display scored89%from 54 tests.

About plugin

  • Plugin page: woo-price-display
  • Plugin version: 0.1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Nov 22, 2018
  • Latest release: Jan 1, 2022
  • Number of updates: 20
  • Update frequency: every 56.8 days
  • Top authors: ty_h11 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,028 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.15ms] Passed 4 tests

An overview of server-side resources used by Woocommerce Price Display
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.97 ▲3.21
Dashboard /wp-admin3.31 ▼0.0344.52 ▼13.42
Posts /wp-admin/edit.php3.36 ▲0.0149.77 ▼0.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.19 ▼22.17
Media Library /wp-admin/upload.php3.23 ▲0.0134.65 ▼0.72

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Price Display
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.80 ▲0.441.77 ▲0.0940.73 ▼2.53
Dashboard /wp-admin2,206 ▲544.84 ▼0.86109.52 ▲15.6438.82 ▼2.62
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0442.51 ▲0.3236.05 ▼0.66
Add New Post /wp-admin/post-new.php1,538 ▼423.13 ▲0.28663.89 ▲7.8056.40 ▲0.08
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0394.50 ▼16.1944.16 ▼5.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: pricing, woocommerce, price, ecommerce

woo-price-display/woocommerce-price-display.php 85% from 13 tests

This is the main PHP file of "Woocommerce Price Display" version 0.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 183 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-price-display.php" instead of "woocommerce-price-display.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin50 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1213550

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected