89% pw-black-friday

Code Review | Black Friday and Cyber Monday Deals for WooCommerce

WordPress plugin Black Friday and Cyber Monday Deals for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: pw-black-friday
  • Plugin version: 1.72
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 9, 2017
  • Latest release: Nov 15, 2023
  • Number of updates: 83
  • Update frequency: every 26.5 days
  • Top authors: pimwick (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /26,240 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.00MB] [CPU: ▼4.69ms] Passed 4 tests

Server-side resources used by Black Friday and Cyber Monday Deals for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.13 ▼0.40
Dashboard /wp-admin3.32 ▼0.0242.99 ▼20.24
Posts /wp-admin/edit.php3.43 ▲0.0845.73 ▲2.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.47 ▲0.34
Media Library /wp-admin/upload.php3.24 ▲0.0136.01 ▲1.55

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Black Friday and Cyber Monday Deals for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.72 ▲0.371.79 ▲0.1238.33 ▼6.80
Dashboard /wp-admin2,198 ▲235.61 ▼0.0485.90 ▼32.9439.35 ▼9.66
Posts /wp-admin/edit.php2,103 ▲32.09 ▲0.0639.77 ▲2.5934.44 ▼0.96
Add New Post /wp-admin/post-new.php1,526 ▼023.02 ▼0.02624.82 ▼41.4854.89 ▼1.48
Media Library /wp-admin/upload.php1,394 ▼04.29 ▲0.0898.33 ▼2.7142.79 ▲0.81

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4, #5, #6, #7, #8, #9 in pw-black-friday/assets to your readme.txt
You can look at the official readme.txt

pw-black-friday/pw-black-friday.php 92% from 13 tests

"Black Friday and Cyber Monday Deals for WooCommerce" version 1.72's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Required version must 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 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin9,236 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PO File71,1571,2083,141
SVG1002,671
PHP17501982,614
CSS49414438
JavaScript1812372

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity375.00
▷ Minimum class complexity375.00
▷ Maximum class complexity375.00
Average method complexity5.51
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods75
▷ Static methods00.00%
▷ Public methods75100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions866.67%
▷ Anonymous functions433.33%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
assets/images/pimwick.png2.74KB2.49KB▼ 9.09%
assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
assets/css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
assets/images/pimwick-icon-120x120.png3.89KB1.99KB▼ 48.71%