10% woo-price-updater

Code Review | WooCommerce Price Updater

WordPress plugin WooCommerce Price Updater scored10%from 54 tests.

About plugin

  • Plugin page: woo-price-updater
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.6.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0
  • WordPress version: 6.3.1
  • First release: Aug 21, 2018
  • Latest release: Aug 21, 2018
  • Number of updates: 24
  • Update frequency: every 4.4 days
  • Top authors: kontur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /937 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/woo-price-updater/classes/Woocommerce_Price_Updater_Plugin.php+32
    Use of undefined constant WOOCOMMERCE_WOOCOMMERCE_PRICE_UPDATER_NAMESPACE - assumed 'WOOCOMMERCE_WOOCOMMERCE_PRICE_UPDATER_NAMESPACE' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.87MB] [CPU: ▼39.39ms] Passed 4 tests

A check of server-side resources used by WooCommerce Price Updater
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.45 ▼0.19
Dashboard /wp-admin3.09 ▼0.2623.30 ▼45.70
Posts /wp-admin/edit.php3.09 ▼0.2724.02 ▼27.60
Add New Post /wp-admin/post-new.php3.09 ▼2.8026.47 ▼71.15
Media Library /wp-admin/upload.php3.09 ▼0.1423.06 ▼13.10
Price Updater /wp-admin/edit.php?post_type=product&page=woo-price-updater3.0726.53

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
recovery_mode_email_last_sent
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

WooCommerce Price Updater: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,457 ▼1,32911.84 ▼2.431.99 ▼0.0342.33 ▼0.93
Dashboard /wp-admin850 ▼1,3201.36 ▼4.3114.11 ▼87.7118.40 ▼23.32
Posts /wp-admin/edit.php861 ▼1,2421.51 ▼0.506.94 ▼31.8619.77 ▼18.65
Add New Post /wp-admin/post-new.php587 ▼9411.71 ▼21.4418.52 ▼622.847.88 ▼63.12
Media Library /wp-admin/upload.php746 ▼6511.71 ▼2.4623.06 ▼82.2423.37 ▼20.83
Price Updater /wp-admin/edit.php?post_type=product&page=woo-price-updater280.420.095.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/woo-price-updater/classes/Woocommerce_Price_Updater_Plugin.php+41
    Use of undefined constant WOOCOMMERCE_WOOCOMMERCE_PRICE_UPDATER_NAMESPACE - assumed 'WOOCOMMERCE_WOOCOMMERCE_PRICE_UPDATER_NAMESPACE' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-price-updater/woocommerce-price-updater.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WOOCOMMERCE_PRICE_UPDATER_ADMIN_URL - assumed 'WOOCOMMERCE_PRICE_UPDATER_ADMIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-price-updater/templates/admin-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/woo-price-updater/templates/admin-form.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=product&page=woo-price-updater
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=woo-price-updater - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (The plugin interface is one powerfull filter and update form located under `Products` > `Price Updater`) image missing
The official readme.txt is a good inspiration

woo-price-updater/woocommerce-price-updater.php 92% from 13 tests

The primary PHP file in "WooCommerce Price Updater" version 0.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-price-updater.php" instead of "woocommerce-price-updater.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 plugin781 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP572198479
CSS1340160
JavaScript13248119
SVG10023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity27.50
▷ Minimum class complexity15.00
▷ Maximum class complexity40.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods738.89%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin