78% woocommerce-bulk-percentage-pricing

Code Review | WooCommerce Bulk Percentage Pricing

WordPress plugin WooCommerce Bulk Percentage Pricing scored 78% from 54 tests.

About plugin

  • Plugin page: woocommerce-bulk-...
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-4.7.2
  • WordPress version: 5.8.1
  • First release: Apr 10, 2015
  • Latest release: Jan 29, 2017
  • Number of updates: 30
  • Update frequency: every 22.0 days
  • Top authors: hussam7ussien (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

600+ active / 9,039 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.88MB] [CPU: ▼175.30ms] Passed 4 tests

A check of server-side resources used by WooCommerce Bulk Percentage Pricing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1538.07 ▲17.09
Dashboard /wp-admin2.77 ▼0.2923.77 ▼26.94
Posts /wp-admin/edit.php2.77 ▼0.3428.08 ▼24.56
Add New Post /wp-admin/post-new.php2.77 ▼2.6621.50 ▼637.91
Media Library /wp-admin/upload.php2.77 ▼0.2322.47 ▼11.78
Bulk percentage pricing /wp-admin/options-general.php?page=woocommerce-bulk-percentage-pricing/bulk-percentage-pricing.php2.7722.59

Server storage [IO: ▲1.06MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • You have illegally modified 1 file (0.62KB) outside of "wp-content/plugins/woocommerce-bulk-percentage-pricing/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 27 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Bulk Percentage Pricing
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲12616.35 ▲0.6910.19 ▼2.4544.55 ▼7.32
Dashboard /wp-admin2,972 ▲445.95 ▼0.04147.09 ▼20.24109.05 ▼4.79
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0272.30 ▲0.8293.13 ▼1.29
Add New Post /wp-admin/post-new.php1,686 ▲318.81 ▲0.50409.10 ▲0.62107.44 ▼5.23
Media Library /wp-admin/upload.php1,812 ▲55.02 ▲0.00172.81 ▲15.37113.43 ▼7.82
Bulk percentage pricing /wp-admin/options-general.php?page=woocommerce-bulk-percentage-pricing/bulk-percentage-pricing.php1,3152.7571.07152.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=woocommerce-bulk-percentage-pricing/bulk-percentage-pricing.php
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/woocommerce-bulk-percentage-pricing/bulk-percentage-pricing.php:273

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: bulk, woocommerce, pricing, percentage

woocommerce-bulk-percentage-pricing/bulk-percentage-pricing.php 85% from 13 tests

The primary PHP file in "WooCommerce Bulk Percentage Pricing" version 2.1.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-bulk-percentage-pricing.php" instead of "bulk-percentage-pricing.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin9,738 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS613227,116
JavaScript86943262,098
SVG100288
PHP14147190
LESS14046

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin