83% woo-bulk-edit-price

Code Review | Woocommerce bulk edit price

WordPress plugin Woocommerce bulk edit price scored83%from 54 tests.

About plugin

  • Plugin page: woo-bulk-edit-price
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 1, 2018
  • Latest release: Jul 1, 2018
  • Number of updates: 3
  • Update frequency: every 3.0 days
  • Top authors: promz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /724 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.70ms] Passed 4 tests

This is a short check of server-side resources used by Woocommerce bulk edit price
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.0246.23 ▲2.60
Dashboard /wp-admin3.59 ▼0.0453.10 ▼13.06
Posts /wp-admin/edit.php3.71 ▲0.0351.99 ▼2.55
Add New Post /wp-admin/post-new.php6.19 ▲0.0594.67 ▼8.55
Media Library /wp-admin/upload.php3.52 ▲0.0339.69 ▲1.37

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce bulk edit price
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10214.30 ▼0.302.02 ▲0.0540.24 ▼4.28
Dashboard /wp-admin2,223 ▲495.61 ▼0.0286.39 ▼2.7737.59 ▼4.86
Posts /wp-admin/edit.php2,135 ▲322.05 ▲0.0642.66 ▲4.5631.92 ▼2.80
Add New Post /wp-admin/post-new.php1,575 ▲4418.41 ▼4.96634.79 ▼60.8952.23 ▼14.90
Media Library /wp-admin/upload.php1,437 ▲374.10 ▼0.13104.18 ▲2.0839.74 ▼3.62

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-bulk-edit-price/admin/init.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-bulk-edit-price/admin/init.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Description)
You can look at the official readme.txt

woo-bulk-edit-price/init.php 85% from 13 tests

The main PHP file in "Woocommerce bulk edit price" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-bulk-edit-price.php" instead of "init.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin220 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25115137
CSS12042
JavaScript115241

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Screenshot_1.png48.81KB18.35KB▼ 62.39%