73% wr-price-list-for-woocommerce

Code Review | WR Price List Manager For Woocommerce

WordPress plugin WR Price List Manager For Woocommerce scored73%from 54 tests.

About plugin

  • Plugin page: wr-price-list-for...
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2019
  • Latest release: Nov 5, 2023
  • Number of updates: 217
  • Update frequency: every 7.0 days
  • Top authors: webreadynow (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /3,688 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.57ms] Passed 4 tests

An overview of server-side resources used by WR Price List Manager For Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.32 ▼3.65
Dashboard /wp-admin3.35 ▲0.0443.19 ▼7.55
Posts /wp-admin/edit.php3.40 ▲0.0461.70 ▲11.39
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.53 ▲2.63
Media Library /wp-admin/upload.php3.27 ▲0.0437.23 ▲2.30

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 58 new files
Database: 2 new tables, 10 new options
New tables
wp_wr_price_lists_price
wp_wr_price_lists
New WordPress options
can_compress_scripts
wrpl_plugin_version
db_upgraded
widget_recent-posts
widget_theysaidso_widget
wrpl-default_list
theysaidso_admin_options
wrpl-hide_price
wrpl-assign-method
widget_recent-comments

Browser metrics Passed 4 tests

WR Price List Manager For Woocommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4314.25 ▼0.461.71 ▼0.2243.85 ▲0.78
Dashboard /wp-admin2,207 ▲335.56 ▼0.0584.39 ▼11.7178.86 ▲37.24
Posts /wp-admin/edit.php2,122 ▲221.99 ▲0.0340.80 ▲1.1240.27 ▲1.73
Add New Post /wp-admin/post-new.php1,556 ▲3023.45 ▲0.36696.23 ▲97.5059.36 ▲5.98
Media Library /wp-admin/upload.php1,415 ▲154.17 ▼0.05105.49 ▲5.8268.78 ▲23.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_wr_price_lists
    • wp_wr_price_lists_price
  • This plugin does not fully uninstall, leaving 10 options in the database
    • wrpl-default_list
    • wrpl_plugin_version
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • wrpl-assign-method
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • wrpl-hide_price

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)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wr-price-list-for-woocommerce/wr_price_list.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: price, price list, b2c, woocommerce, discounts...

wr-price-list-for-woocommerce/wr_price_list.php 77% from 13 tests

The main file in "WR Price List Manager For Woocommerce" v. 1.0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wr-price-list-for-woocommerce.php" instead of "wr_price_list.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected4,384 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
CSS7122771,728
PHP214466371,653
JavaScript96699678
PO File18491219
JSON100106

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.15
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods108
▷ Static methods98.33%
▷ Public methods10597.22%
▷ Protected methods00.00%
▷ Private methods32.78%
Functions12
▷ Named functions650.00%
▷ Anonymous functions650.00%
Constants5
▷ Global constants5100.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
8 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png12.17KB11.41KB▼ 6.28%
assets/img/price-tag.png0.38KB0.27KB▼ 29.77%
assets/img/120x120.png1.40KB0.69KB▼ 50.77%
assets/img/no-image.png2.14KB2.41KB0.00%
assets/img/invalid.png0.30KB0.24KB▼ 22.12%