69% product-price-history

Code Review | Product Price History for WooCommerce

WordPress plugin Product Price History for WooCommerce scored 69% from 54 tests.

About plugin

  • Plugin page: product-price-his...
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 15, 2023
  • Latest release: Sep 20, 2023
  • Number of updates: 54
  • Update frequency: every 3.5 days
  • Top authors: devnethr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 1,413 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.53MB] [CPU: ▼2.81ms] Passed 4 tests

A check of server-side resources used by Product Price History for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5939.05 ▼0.54
Dashboard /wp-admin3.89 ▲0.5948.23 ▼0.97
Posts /wp-admin/edit.php3.94 ▲0.5851.09 ▲4.88
Add New Post /wp-admin/post-new.php6.41 ▲0.5290.37 ▼12.38
Media Library /wp-admin/upload.php3.65 ▲0.4239.11 ▲2.65
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius3.9840.67

Server storage [IO: ▲3.45MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 217 new files
Database: 2 new tables, 9 new options
New tables
wp_pph_price_history
wp_pph_price_alerts
New WordPress options
fs_active_plugins
fs_accounts
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
fs_debug_mode
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Product Price History for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲8014.47 ▲0.091.63 ▼0.2433.83 ▼4.46
Dashboard /wp-admin2,240 ▲485.80 ▲0.89103.97 ▼7.8643.55 ▲2.69
Posts /wp-admin/edit.php2,126 ▲372.05 ▲0.0439.92 ▲2.2239.40 ▲6.17
Add New Post /wp-admin/post-new.php1,550 ▲523.25 ▲4.68658.93 ▲44.1151.66 ▼11.35
Media Library /wp-admin/upload.php1,422 ▲374.26 ▲0.04100.23 ▼0.3444.56 ▲0.45
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0941.7123.6426.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/product-price-history/fs/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_pph_price_alerts
    • wp_pph_price_history
  • The uninstall procedure has failed, leaving 9 options in the database
    • fs_accounts
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • fs_debug_mode
    • fs_active_plugins

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

product-price-history/product-price-history.php Passed 13 tests

"Product Price History for WooCommerce" version 2.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
47 characters long description:
Price history tracker for WooCommerce products.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin35,173 lines of code in 169 files:
LanguageFilesBlank linesComment linesLines of code
PHP1428,35617,90134,950
JavaScript83570204
CSS191019

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity71.09
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes66
▷ Abstract classes23.03%
▷ Concrete classes6496.97%
▷ Final classes00.00%
Methods1,362
▷ Static methods21715.93%
▷ Public methods96570.85%
▷ Protected methods171.25%
▷ Private methods38027.90%
Functions107
▷ Named functions10497.20%
▷ Anonymous functions32.80%
Constants149
▷ Global constants10268.46%
▷ Class constants4731.54%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fs/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
fs/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%