89% pw-woocommerce-on-sale

Code Review | PW WooCommerce On Sale!

WordPress plugin PW WooCommerce On Sale! scored89%from 54 tests.

About plugin

  • Plugin page: pw-woocommerce-on...
  • Plugin version: 1.33
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 20, 2017
  • Latest release: Oct 25, 2023
  • Number of updates: 39
  • Update frequency: every 57.1 days
  • Top authors: pimwick (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /13,952 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by PW WooCommerce On Sale!
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.41 ▼6.36
Dashboard /wp-admin3.33 ▼0.0143.21 ▼17.76
Posts /wp-admin/edit.php3.44 ▲0.0946.51 ▼0.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0275.83 ▼8.65
Media Library /wp-admin/upload.php3.25 ▲0.0235.64 ▲0.92

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for PW WooCommerce On Sale!
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.461.52 ▼0.1239.30 ▼6.17
Dashboard /wp-admin2,195 ▲175.61 ▼0.1192.98 ▼23.3241.57 ▼1.44
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0139.91 ▲4.1135.69 ▲4.04
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▲0.11661.13 ▼22.7245.43 ▼13.21
Media Library /wp-admin/upload.php1,394 ▼94.19 ▲0.0396.00 ▼11.6140.45 ▼7.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: The official readme.txt is a good inspiration

pw-woocommerce-on-sale/pw-on-sale.php 85% from 13 tests

The main PHP file in "PW WooCommerce On Sale!" ver. 1.33 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pw-woocommerce-on-sale.php" instead of "pw-on-sale.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.5" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected3,548 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP713842653
CSS43213147
JavaScript112377

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods29
▷ Static methods310.34%
▷ Public methods29100.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

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
assets/css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
assets/css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%