77% pricelist-for-woocommerce

Code Review | PriceList for WooCommerce

WordPress plugin PriceList for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: pricelist-for-woo...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-6.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2020
  • Latest release: Nov 11, 2022
  • Number of updates: 29
  • Update frequency: every 29.0 days
  • Top authors: sam1966 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,955 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by PriceList for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.04 ▼3.44
Dashboard /wp-admin3.31 ▲0.0049.76 ▲2.56
Posts /wp-admin/edit.php3.36 ▲0.0046.00 ▼4.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.09 ▼2.68
Media Library /wp-admin/upload.php3.23 ▲0.0033.52 ▲0.45
Settings /wp-admin/admin.php?page=pricelist-wc-settings3.0022.41
Go Pro /wp-admin/admin.php?page=pricelist-wc-gopro3.0023.75

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PriceList for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.24 ▼1.161.97 ▲0.1745.98 ▲4.23
Dashboard /wp-admin2,203 ▲125.91 ▲1.01100.15 ▼2.5340.83 ▼2.22
Posts /wp-admin/edit.php2,086 ▼62.00 ▼0.0634.34 ▼10.6233.94 ▼4.40
Add New Post /wp-admin/post-new.php1,542 ▲2518.50 ▲0.70615.64 ▼3.1368.66 ▲17.12
Media Library /wp-admin/upload.php1,382 ▼64.23 ▲0.0695.40 ▼4.5442.16 ▼4.37
Settings /wp-admin/admin.php?page=pricelist-wc-settings280.440.093.78
Go Pro /wp-admin/admin.php?page=pricelist-wc-gopro280.440.083.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'pricelist_wc_generate_output' not found in wp-content/plugins/pricelist-for-woocommerce/pricelist-for-woocommerce-view-pdf.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/pricelist-for-woocommerce/templates/settings_free.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/pricelist-for-woocommerce/pricelist-for-woocommerce.php:29
    • > PHP Fatal error
      Uncaught Error: Call to a member function include_file() on null in wp-content/plugins/pricelist-for-woocommerce/pricelist-for-woocommerce-view.php:171
    • > PHP Fatal error
      Uncaught Error: Class 'pricelist_wc_generate_output' not found in wp-content/plugins/pricelist-for-woocommerce/pricelist-for-woocommerce-view-pdf-button.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function include_file() on null in wp-content/plugins/pricelist-for-woocommerce/pricelist-for-woocommerce-output-pdf-button.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'pricelist_wc_generate_output' not found in wp-content/plugins/pricelist-for-woocommerce/pricelist-for-woocommerce-view-html.php:10
    • > PHP Fatal error
      Uncaught Error: Call to a member function include_file() on null in wp-content/plugins/pricelist-for-woocommerce/pricelist-for-woocommerce-output-html.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function include_file() on null in wp-content/plugins/pricelist-for-woocommerce/pricelist-for-woocommerce-output-pdf.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=pricelist-wc-settings
    • > Network (severe)
    wp-admin/admin.php?page=pricelist-wc-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=pricelist-wc-gopro
    • > Network (severe)
    wp-admin/admin.php?page=pricelist-wc-gopro - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

pricelist-for-woocommerce/pricelist-for-woocommerce.php 85% from 13 tests

"PriceList for WooCommerce" version 1.1.0'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:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "2.3")
  • Description: Please don't use more than 140 characters for the plugin description (currently 154 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin48,194 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP3330887448,031
CSS18097
Markdown121063
JavaScript1003

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 4,392)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity167.62
▷ Minimum class complexity1.00
▷ Maximum class complexity4,392.00
Average method complexity8.65
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces0
Interfaces0
Traits5
Classes35
▷ Abstract classes00.00%
▷ Concrete classes35100.00%
▷ Final classes00.00%
Methods871
▷ Static methods13215.15%
▷ Public methods53160.96%
▷ Protected methods33638.58%
▷ Private methods40.46%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants112
▷ Global constants10896.43%
▷ Class constants43.57%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin