73% price-optimizer

Code Review | Pricimizer: Dynamic pricing for WooCommerce

WordPress plugin Pricimizer: Dynamic pricing for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: price-optimizer
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 29, 2023
  • Latest release: Oct 3, 2023
  • Number of updates: 19
  • Update frequency: every 8.3 days
  • Top authors: mahdyfo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /242 total downloads

Benchmarks

Plugin footprint 65% 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.21MB] [CPU: ▼0.19ms] Passed 4 tests

Server-side resources used by Pricimizer: Dynamic pricing for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2144.79 ▲2.03
Dashboard /wp-admin3.52 ▲0.2153.91 ▲0.53
Posts /wp-admin/edit.php3.63 ▲0.2763.21 ▲10.97
Add New Post /wp-admin/post-new.php6.12 ▲0.23101.12 ▼8.33
Media Library /wp-admin/upload.php3.44 ▲0.2141.32 ▲5.02

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 26 new files
Database: 1 new table, 6 new options
New tables
wp_pricimizer_price_sessions
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Pricimizer: Dynamic pricing for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.76 ▲0.142.15 ▲0.4443.86 ▲1.43
Dashboard /wp-admin2,248 ▲714.95 ▼0.7598.37 ▲4.0044.71 ▲3.12
Posts /wp-admin/edit.php2,150 ▲472.49 ▲0.5254.06 ▲13.7245.20 ▲10.52
Add New Post /wp-admin/post-new.php1,566 ▲4023.30 ▲5.79667.39 ▲13.3755.68 ▲1.04
Media Library /wp-admin/upload.php1,450 ▲504.53 ▲0.34116.91 ▲11.5248.18 ▲1.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_pricimizer_price_sessions
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/price-optimizer/admin/templates/global_settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/price-optimizer/admin/templates/product_settings.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in price-optimizer/assets to your readme.txt
You can look at the official readme.txt

price-optimizer/pricimizer.php 85% from 13 tests

"Pricimizer: Dynamic pricing for WooCommerce" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("price-optimizer.php" instead of "pricimizer.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected2,118 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP71702061,012
SVG100655
CSS44112331
JavaScript411395
JSON10016
Markdown1309

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity47.67
▷ Minimum class complexity7.00
▷ Maximum class complexity104.00
Average method complexity4.89
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods36
▷ Static methods822.22%
▷ Public methods2672.22%
▷ Protected methods00.00%
▷ Private methods1027.78%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ 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
No PNG files were detected