84% countdown-woocommerce-sale

Code Review | Countdown WooCommerce Sale

WordPress plugin Countdown WooCommerce Sale scored84%from 54 tests.

About plugin

  • Plugin page: countdown-woocomm...
  • Plugin version: 1.17
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 3, 2018
  • Latest release: Oct 28, 2023
  • Number of updates: 50
  • Update frequency: every 38.2 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,554 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.42ms] Passed 4 tests

Analyzing server-side resources used by Countdown WooCommerce Sale
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.52 ▲2.79
Dashboard /wp-admin3.32 ▲0.0146.04 ▲0.25
Posts /wp-admin/edit.php3.37 ▲0.0139.74 ▼10.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.74 ▼8.76
Media Library /wp-admin/upload.php3.24 ▲0.0131.26 ▼2.25

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
countdown_woocommerce_sale

Browser metrics Passed 4 tests

Countdown WooCommerce Sale: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲11413.81 ▼0.549.50 ▲7.8743.96 ▲3.62
Dashboard /wp-admin2,198 ▲215.51 ▼0.0984.12 ▼2.1237.71 ▼9.53
Posts /wp-admin/edit.php2,103 ▲32.02 ▼0.1434.57 ▼4.0231.33 ▼2.59
Add New Post /wp-admin/post-new.php1,526 ▼223.36 ▲0.16590.22 ▼75.7657.38 ▼9.14
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0195.26 ▼0.7741.98 ▲0.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/countdown-woocommerce-sale/lib/class-countdownwoocommercesaleadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/countdown-woocommerce-sale/lib/class-countdownwoocommercesale.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/countdown-woocommerce-sale/lib/class-countdownwoocommercesaleadmin.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: countdown, product, woocommerce, sale

countdown-woocommerce-sale/countdownwoocommercesale.php 85% from 13 tests

The main PHP script in "Countdown WooCommerce Sale" version 1.17 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "3.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("countdown-woocommerce-sale.php" instead of "countdownwoocommercesale.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected624 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP478165338
JavaScript357246286

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity21.50
▷ Minimum class complexity14.00
▷ Maximum class complexity29.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin