84% wc-price-history

Code Review | WC Price History for Omnibus

WordPress plugin WC Price History for Omnibus scored84%from 54 tests.

About plugin

  • Plugin page: wc-price-history
  • Plugin version: 1.8.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Nov 29, 2023
  • Number of updates: 53
  • Update frequency: every 6.3 days
  • Top authors: kkarpieszuk (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /6,085 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.93ms] Passed 4 tests

This is a short check of server-side resources used by WC Price History for Omnibus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0532.81 ▼8.57
Dashboard /wp-admin3.36 ▲0.0147.39 ▼14.29
Posts /wp-admin/edit.php3.47 ▲0.1248.64 ▼0.80
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.99 ▼16.07
Media Library /wp-admin/upload.php3.28 ▲0.0536.06 ▲1.52

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

WC Price History for Omnibus: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.67 ▲0.571.66 ▲0.0739.39 ▼5.06
Dashboard /wp-admin2,201 ▲245.60 ▲0.0290.06 ▼13.7042.71 ▲0.45
Posts /wp-admin/edit.php2,107 ▲71.97 ▲0.0142.67 ▲7.6436.35 ▼1.87
Add New Post /wp-admin/post-new.php1,532 ▲623.29 ▲0.01593.83 ▼40.0355.72 ▲4.85
Media Library /wp-admin/upload.php1,406 ▲124.29 ▲0.0798.45 ▲0.9540.44 ▼1.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wc-price-history/constants.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wc-price-history/constants.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% 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
7 plugin tags: woocommerce, 30days, prior, omnibus, history...

wc-price-history/plugin.php 85% from 13 tests

The principal PHP file in "WC Price History for Omnibus" v. 1.8.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 254 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-price-history.php" instead of "plugin.php")

Code Analysis Passed 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
There were no executable files found in this plugin1,510 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP243619561,400
CSS217078
Markdown112018
XML1007
JSON1005
JavaScript1002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.29
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods100
▷ Static methods1919.00%
▷ Public methods8787.00%
▷ Protected methods00.00%
▷ Private methods1313.00%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png74.43KB26.70KB▼ 64.13%