78% raise-prices-with-sales-for-woocommerce

Code Review | Raise Prices with Sales for WooCommerce

WordPress plugin Raise Prices with Sales for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: raise-prices-with...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 29, 2017
  • Latest release: Apr 17, 2022
  • Number of updates: 12
  • Update frequency: every 151.3 days
  • Top authors: ibenic (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,860 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲4.62MB] [CPU: ▲14.13ms] Passed 4 tests

Analyzing server-side resources used by Raise Prices with Sales for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.49 ▲5.0360.36 ▲18.74
Dashboard /wp-admin8.51 ▲5.2164.98 ▲15.23
Posts /wp-admin/edit.php8.51 ▲5.1675.46 ▲25.54
Add New Post /wp-admin/post-new.php8.97 ▲3.0898.40 ▼3.01
Media Library /wp-admin/upload.php8.51 ▲5.2965.15 ▲29.40
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5157.15

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 189 new files
Database: no new tables, 10 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Raise Prices with Sales for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.26 ▲1.031.59 ▼2.8226.69 ▼18.68
Dashboard /wp-admin2,234 ▲575.71 ▲0.1096.00 ▲2.6044.80 ▲5.69
Posts /wp-admin/edit.php2,137 ▲371.99 ▼0.0340.66 ▲0.1241.13 ▲6.75
Add New Post /wp-admin/post-new.php1,547 ▲1423.09 ▼0.02676.16 ▲31.3253.89 ▼4.30
Media Library /wp-admin/upload.php1,436 ▲394.22 ▲0.0593.78 ▼6.8341.50 ▼1.07
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0581.6927.9029.69

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
  • This plugin does not fully uninstall, leaving 10 options in the database
    • fs_active_plugins
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • fs_gdpr
    • fs_debug_mode
    • can_compress_scripts
    • fs_accounts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/raise-prices-with-sales-for-woocommerce/public/partials/rps_wc-public-display.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woocommerce_wp_checkbox() in wp-content/plugins/raise-prices-with-sales-for-woocommerce/admin/partials/rps_wc-admin-prices.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/raise-prices-with-sales-for-woocommerce/admin/partials/js-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/raise-prices-with-sales-for-woocommerce/admin/partials/rps_wc-admin-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: sales, ecommerce, woocommerce

raise-prices-with-sales-for-woocommerce/raise-prices-with-sales-for-woocommerce.php 92% from 13 tests

The principal PHP file in "Raise Prices with Sales for WooCommerce" v. 1.3.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin31,057 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity77.45
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes00.00%
▷ Static methods17815.28%
▷ Public methods82070.39%
▷ Protected methods151.29%
▷ Private methods33028.33%
▷ Named functions97100.00%
▷ Anonymous functions00.00%
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/images/click-sales-point.png80.63KB22.23KB▼ 72.43%
admin/images/add-sales-point.png87.57KB24.21KB▼ 72.35%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%