90% dynamic-price-change-for-woocommerce

Code Review | Dynamic Price Change for WooCommerce

WordPress plugin Dynamic Price Change for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: dynamic-price-cha...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Jul 7, 2021
  • Latest release: Jul 7, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: codeptsolutions (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /342 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Dynamic Price Change for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.51 ▼6.99
Dashboard /wp-admin3.31 ▲0.0046.03 ▲0.85
Posts /wp-admin/edit.php3.36 ▲0.0060.08 ▲7.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.00 ▲1.88
Media Library /wp-admin/upload.php3.23 ▲0.0031.99 ▼1.22

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Dynamic Price Change for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.21 ▼1.171.59 ▼0.2438.36 ▼2.52
Dashboard /wp-admin2,212 ▲244.86 ▼0.08109.19 ▼6.8944.39 ▲3.86
Posts /wp-admin/edit.php2,099 ▲102.04 ▲0.0443.64 ▲0.4038.93 ▲1.32
Add New Post /wp-admin/post-new.php1,539 ▲623.27 ▼0.10652.11 ▼12.1958.75 ▲4.00
Media Library /wp-admin/upload.php1,394 ▲94.21 ▼0.0696.02 ▼6.0042.70 ▼0.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
No tags were found

dynamic-price-change-for-woocommerce/dynamic-price-change-for-woocommerce.php Passed 13 tests

The principal PHP file in "Dynamic Price Change for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
103 characters long description:
Change Prices on Products with defined Times. Build scarcity so your customers won't be able to resist.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,321 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP569259704
JavaScript44133331
CSS420281
Markdown1205

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity24.33
▷ Minimum class complexity2.00
▷ Maximum class complexity54.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.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
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
assets/images/logo-128x128.png7.39KB2.59KB▼ 64.91%
assets/images/logo-256x256.png12.75KB4.22KB▼ 66.90%