90% woo-sale-price

Code Review | Woo Sale Price

WordPress plugin Woo Sale Price scored90%from 54 tests.

About plugin

  • Plugin page: woo-sale-price
  • Plugin version: 0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: May 4, 2017
  • Latest release: Jun 9, 2023
  • Number of updates: 16
  • Update frequency: every 139.2 days
  • Top authors: labdav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,416 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.65ms] Passed 4 tests

A check of server-side resources used by Woo Sale Price
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.45 ▼0.69
Dashboard /wp-admin3.31 ▲0.0142.75 ▼2.40
Posts /wp-admin/edit.php3.36 ▲0.0045.32 ▲2.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.73 ▼5.47
Media Library /wp-admin/upload.php3.23 ▲0.0030.28 ▼6.04

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Sale Price
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲1014.17 ▼0.191.55 ▼0.4636.61 ▼2.88
Dashboard /wp-admin2,205 ▲315.65 ▲0.1083.63 ▼2.0038.75 ▲0.81
Posts /wp-admin/edit.php2,107 ▲72.01 ▼0.0035.53 ▲0.7335.95 ▲2.40
Add New Post /wp-admin/post-new.php1,533 ▼423.32 ▲5.05678.92 ▲27.0973.34 ▲5.91
Media Library /wp-admin/upload.php1,401 ▲44.23 ▲0.0694.59 ▲0.8440.06 ▼1.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: prezzo scontato, regular price, ldav, discount, woocommerce...

woo-sale-price/woo-sale-price.php 92% from 13 tests

Analyzing the main PHP file in "Woo Sale Price" version 0.3
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 197 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin120 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1131777
PO File16643

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
No PNG images were found in this plugin