83% edd-bulk-sale-price

Code Review | EDD Bulk Sale Price

WordPress plugin EDD Bulk Sale Price scored83%from 54 tests.

About plugin

  • Plugin page: edd-bulk-sale-price
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2017
  • Latest release: Mar 7, 2019
  • Number of updates: 35
  • Update frequency: every 21.0 days
  • Top authors: wooninjas (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /2,213 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by EDD Bulk Sale Price
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.38 ▼2.96
Dashboard /wp-admin3.31 ▼0.0441.80 ▼19.38
Posts /wp-admin/edit.php3.36 ▲0.0045.83 ▲1.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0074.31 ▼16.08
Media Library /wp-admin/upload.php3.23 ▲0.0031.74 ▼0.37

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for EDD Bulk Sale Price
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.37 ▼0.001.99 ▲0.1647.05 ▼0.07
Dashboard /wp-admin2,204 ▲265.57 ▼0.1493.54 ▼21.8942.82 ▼1.47
Posts /wp-admin/edit.php2,106 ▲92.01 ▲0.0135.61 ▼0.0633.11 ▼4.20
Add New Post /wp-admin/post-new.php1,537 ▲923.17 ▲0.11677.83 ▲30.8050.13 ▲2.09
Media Library /wp-admin/upload.php1,409 ▲124.23 ▲0.0296.69 ▼4.2640.96 ▼5.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant EDDSPP_ASSETS_URL - assumed 'EDDSPP_ASSETS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/edd-bulk-sale-price/includes/admin/templates/bulk-sale-price.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/edd-bulk-sale-price/edd-sale-price-plus.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/edd-bulk-sale-price/includes/admin/templates/bulk-sale-price.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #3 (Bulk Sale Price page) image not found
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
The official readme.txt might help

edd-bulk-sale-price/edd-sale-price-plus.php 85% from 13 tests

The primary PHP file in "EDD Bulk Sale Price" version 1.0.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("edd-bulk-sale-price.php" instead of "edd-sale-price-plus.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
Success! There were no dangerous files found in this plugin1,411 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP114115731,144
JavaScript14717166
CSS12070
PO File15831

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity22.25
▷ Minimum class complexity3.00
▷ Maximum class complexity56.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods64
▷ Static methods3351.56%
▷ Public methods5789.06%
▷ Protected methods23.12%
▷ Private methods57.81%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin