58% wr-price-list-for-woocommerce

Code Review | WR Price List Manager For Woocommerce

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

About plugin

  • Plugin page: wr-price-list-for...
  • Plugin version: 1.0.3
  • PHP compatiblity: 4.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6.1
  • WordPress version: 5.9.2
  • First release: Sep 19, 2019
  • Latest release: Feb 12, 2021
  • Number of updates: 102
  • Update frequency: every 5.0 days
  • Top authors: webreadynow (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active / 1,755 total downloads


Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼293.76ms] Passed 4 tests

An overview of server-side resources used by WR Price List Manager For Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0161.11 ▲3.92
Dashboard /wp-admin3.41 ▲0.0135.77 ▼1.61
Posts /wp-admin/edit.php3.64 ▲0.0142.01 ▲1.53
Add New Post /wp-admin/post-new.php6.89 ▼0.0899.41 ▼1,165.05
Media Library /wp-admin/upload.php3.30 ▼0.0024.27 ▼9.92

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 65 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WR Price List Manager For Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,786 ▲3215.92 ▼0.055.53 ▼0.342.41 ▲0.23
Dashboard /wp-admin2,918 ▲606.03 ▼0.20119.90 ▼14.76152.36 ▼10.48
Posts /wp-admin/edit.php2,711 ▲263.23 ▼0.0063.47 ▼3.55137.63 ▼10.17
Add New Post /wp-admin/post-new.php1,683 ▼9019.93 ▼2.19392.24 ▼49.67154.36 ▼2.53
Media Library /wp-admin/upload.php1,717 ▲195.51 ▲0.03140.63 ▼0.52190.81 ▲0.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/wr-price-list-for-woocommerce/uninstall.php+25
    Uncaught Error: Class 'WRPL_Signature' not found in wp-content/plugins/wr-price-list-for-woocommerce/uninstall.php:25
    Stack trace:
    #0 wp-admin/includes/plugin.php(1239): include_once()
    #1 wp-admin/includes/plugin.php(956): uninstall_plugin()
  • The plugin did not uninstall correctly, leaving 65 files (0.59MB) in the plugin directory
    • (new file) assets/img/no-image.png
    • (new file) assets/css/admin/jquery-ui.css
    • (new file) assets/img/120x120.png
    • (new file) assets/css/admin/bootstrap.min.css
    • (new file) assets/css/admin/wrtable.min.css
    • (new file) assets/css/admin/bootstrap-treeview.min.css
    • (new file) assets/css/main.css
    • (new file) assets/css/admin/main.css
    • (new file) assets/img/close.png
    • (new file) assets/img/invalid.png
    • ...
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • recovery_mode_email_last_sent

Smoke tests 50% 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 0% 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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_select_price_list.php
    • > /wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_table_products.php
    • > /wp-content/plugins/wr-price-list-for-woocommerce/wr_price_list.php
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_create_price_list_and_role.php:14
    • > PHP Fatal error
      Uncaught Error: Call to a member function wrpl_get_all_product_cat() on null in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_filters_products.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function wrpl_get_rules() on null in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_price_list_by_category.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/modals/__remove_price_list_modal.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/modals/__edit_price_list_modal.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_import_export.php:10
    • > PHP Notice
      Undefined variable: product_controller in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_filters_products.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_settings.php:5
    • > PHP Notice
      Undefined index: wrpl_submit_license in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_license.php on line 3
    • > PHP Notice
      Undefined variable: plists in wp-content/plugins/wr-price-list-for-woocommerce/templates/includes/_select_price_list.php on line 5

User-side errors Passed 1 test

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


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: hide add to cart button, hide price, add roles, b2c, b2b...

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

"WR Price List Manager For Woocommerce" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wr-price-list-for-woocommerce.php" instead of "wr_price_list.php")
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: The description should be shorter than 140 characters (currently 230 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin4,961 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PO File17898208

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity17.50
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
▷ Static methods87.84%
▷ Public methods9997.06%
▷ Protected methods00.00%
▷ Private methods32.94%
▷ Named functions541.67%
▷ Anonymous functions758.33%
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/valid.png0.32KB0.25KB▼ 21.52%
assets/img/open.png0.38KB0.17KB▼ 56.85%
assets/img/invalid.png0.30KB0.24KB▼ 22.12%
assets/img/120x120.png1.40KB0.69KB▼ 50.77%