89% edd-sale-price

Code Review | EDD Sale Price

WordPress plugin EDD Sale Price scored89%from 54 tests.

About plugin

  • Plugin page: edd-sale-price
  • Plugin version: 1.0.5.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Feb 26, 2015
  • Latest release: Aug 24, 2021
  • Number of updates: 17
  • Update frequency: every 139.8 days
  • Top authors: sormano (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /16,196 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.54ms] Passed 4 tests

An overview of server-side resources used by EDD Sale Price
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.02 ▼1.68
Dashboard /wp-admin3.33 ▲0.0346.16 ▼5.48
Posts /wp-admin/edit.php3.38 ▲0.0249.09 ▲3.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.05 ▲10.17
Media Library /wp-admin/upload.php3.25 ▲0.0233.87 ▲1.38

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for EDD Sale Price
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.211.74 ▲0.1842.99 ▼1.49
Dashboard /wp-admin2,206 ▲185.88 ▲1.00105.38 ▼11.4539.04 ▼2.57
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0240.08 ▲0.9634.04 ▲0.83
Add New Post /wp-admin/post-new.php1,533 ▼323.48 ▲0.23582.97 ▼9.6254.35 ▼4.35
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0294.03 ▼1.1441.30 ▲0.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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 to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Overview download listing), #2 (Download detail page pricing), #3 (Checkout price - requires EDD 2.3!), #4 (Admin download sale price setting), #5 (Admin download variable sale price settings), #6 (Another download detail page example)
Please take inspiration from this readme.txt

edd-sale-price/edd-sale-price.php Passed 13 tests

The primary PHP file in "EDD Sale Price" version 1.0.5.1 is used by WordPress to initiate all plugin functionality
34 characters long description:
Put your digital products on sale.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin302 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3156263271
PO File15831

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity23.00
▷ Minimum class complexity3.00
▷ Maximum class complexity49.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
6 compressed PNG files occupy 0.08MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png7.80KB8.13KB0.00%
screenshot-5.png17.41KB18.36KB0.00%
screenshot-4.png7.55KB7.85KB0.00%
screenshot-6.png19.88KB20.53KB0.00%
screenshot-3.png10.99KB11.98KB0.00%