83% woocommerce-prices

Code Review | WooCommerce Prices

WordPress plugin WooCommerce Prices scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-prices
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2013
  • Latest release: Mar 14, 2014
  • Number of updates: 11
  • Update frequency: every 13.0 days
  • Top authors: sydcode (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /14,107 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.25ms] Passed 4 tests

A check of server-side resources used by WooCommerce Prices
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.66 ▼2.81
Dashboard /wp-admin3.37 ▲0.0644.60 ▼2.86
Posts /wp-admin/edit.php3.42 ▲0.0647.80 ▼0.03
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.63 ▼8.86
Media Library /wp-admin/upload.php3.29 ▲0.0634.94 ▼2.45
Prices /wp-admin/edit.php?post_type=product&page=woocommerce_prices3.0625.06

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Prices
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.40 ▼0.351.87 ▲0.1041.06 ▼1.38
Dashboard /wp-admin2,200 ▲155.79 ▼0.1097.24 ▼11.4340.55 ▼3.17
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0639.92 ▼5.9134.74 ▼2.03
Add New Post /wp-admin/post-new.php1,514 ▼1517.54 ▼0.79605.37 ▼11.3854.82 ▼6.05
Media Library /wp-admin/upload.php1,391 ▲64.19 ▼0.0595.06 ▼7.6943.03 ▼0.79
Prices /wp-admin/edit.php?post_type=product&page=woocommerce_prices280.440.073.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=product&page=woocommerce_prices
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=woocommerce_prices - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

woocommerce-prices/woocommerce-prices.php 92% from 13 tests

The main file in "WooCommerce Prices" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin6,182 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript97775954,414
CSS6111721,434
PHP23389334

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
33 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
smoothness/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
slickgrid/images/arrow_undo.png0.56KB0.67KB0.00%
slickgrid/images/bullet_toggle_plus.png0.15KB0.23KB0.00%
slickgrid/images/drag-handle.png1.10KB0.11KB▼ 90.00%
smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%