83% finale-woocommerce-sales-countdown-timer-discount

Code Review | Finale Lite - Sales Countdown Timer & Discount for WooCommerce

WordPress plugin Finale Lite - Sales Countdown Timer & Discount for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: finale-woocommerc...
  • Plugin version: 2.16.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 17, 2017
  • Latest release: Jan 10, 2023
  • Number of updates: 124
  • Update frequency: every 16.7 days
  • Top authors: djeet (46.77%)xlplugins (37.1%)amans2k (17.74%)

Code review

54 tests

User reviews

130 reviews

Install metrics

8,000+ active /224,123 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.59ms] Passed 4 tests

Server-side resources used by Finale Lite - Sales Countdown Timer & Discount for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.70 ▼2.61
Dashboard /wp-admin3.36 ▲0.0645.86 ▼11.91
Posts /wp-admin/edit.php3.47 ▲0.1247.88 ▲0.63
Add New Post /wp-admin/post-new.php5.94 ▲0.0687.39 ▼8.46
Media Library /wp-admin/upload.php3.28 ▲0.0636.80 ▲3.31

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 350 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Finale Lite - Sales Countdown Timer & Discount for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.59 ▼0.721.49 ▼0.2444.55 ▼5.95
Dashboard /wp-admin2,212 ▲275.90 ▲0.99102.05 ▼13.6736.13 ▼11.51
Posts /wp-admin/edit.php2,098 ▲91.99 ▼0.0038.16 ▲1.5335.64 ▲0.19
Add New Post /wp-admin/post-new.php1,548 ▲1518.24 ▼4.95588.15 ▼78.4261.00 ▲9.37
Media Library /wp-admin/upload.php1,391 ▼04.26 ▲0.0497.35 ▲1.1540.30 ▼1.56

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 46× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/admin/includes/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/admin/includes/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/admin/includes/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/admin/includes/cmb2/includes/types/CMB2_Type_Counter_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/admin/includes/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/admin/includes/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/admin/includes/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/theme-support/kallayas/kallayas.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/admin/includes/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/finale-woocommerce-sales-countdown-timer-discount/admin/includes/cmb2/includes/rest-api/CMB2_REST_Controller.php:4

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

finale-woocommerce-sales-countdown-timer-discount/finale-woocommerce-sales-countdown-timer-discount-plugin-lite.php 85% from 13 tests

The main PHP script in "Finale Lite - Sales Countdown Timer & Discount for WooCommerce" version 2.16.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 182 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("finale-woocommerce-sales-countdown-timer-discount.php" instead of "finale-woocommerce-sales-countdown-timer-discount-plugin-lite.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin36,749 lines of code in 220 files:
LanguageFilesBlank linesComment linesLines of code
PHP1645,37610,22022,318
CSS248591,2467,427
JavaScript297087773,239
SVG2032,560
PO File15377881,205

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity26.74
▷ Minimum class complexity1.00
▷ Maximum class complexity317.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes137
▷ Abstract classes96.57%
▷ Concrete classes12893.43%
▷ Final classes00.00%
Methods1,208
▷ Static methods30225.00%
▷ Public methods1,09490.56%
▷ Protected methods1099.02%
▷ Private methods50.41%
Functions108
▷ Named functions8780.56%
▷ Anonymous functions2119.44%
Constants30
▷ Global constants1136.67%
▷ Class constants1963.33%
▷ Public constants19100.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
29 compressed PNG files occupy 0.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/includes/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
admin/includes/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
admin/includes/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
admin/includes/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
admin/includes/cmb2/images/ico-delete.png0.70KB0.72KB0.00%