89% price-changer-for-woocommerce

Code Review | Price Changer For WooCommerce

WordPress plugin Price Changer For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: price-changer-for...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 19, 2022
  • Latest release: Nov 5, 2023
  • Number of updates: 78
  • Update frequency: every 6.1 days
  • Top authors: yakacj (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /1,026 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: ▼3.48ms] Passed 4 tests

Analyzing server-side resources used by Price Changer For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.50 ▲3.61
Dashboard /wp-admin3.31 ▲0.0046.51 ▼3.10
Posts /wp-admin/edit.php3.36 ▲0.0043.73 ▼7.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.50 ▼1.05
Media Library /wp-admin/upload.php3.23 ▲0.0032.46 ▼1.88

Server storage [IO: ▲0.10MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Price Changer For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.30 ▼0.131.99 ▲0.3043.45 ▲0.71
Dashboard /wp-admin2,198 ▲215.61 ▲0.0887.73 ▼5.7542.13 ▼0.69
Posts /wp-admin/edit.php2,100 ▼31.97 ▲0.0336.50 ▼3.8137.32 ▼0.33
Add New Post /wp-admin/post-new.php1,526 ▼023.26 ▲0.22641.27 ▼48.7253.74 ▼7.16
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.0495.66 ▼10.4639.99 ▼5.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

price-changer-for-woocommerce/yc_price_changer_for_woocommerce.php 77% from 13 tests

The main file in "Price Changer For WooCommerce" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 191 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("price-changer-for-woocommerce.php" instead of "yc_price_changer_for_woocommerce.php")

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
Success! There were no dangerous files found in this plugin262 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP59131226
CSS23128
JavaScript2018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.50
▷ Minimum class complexity3.00
▷ Maximum class complexity4.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin