89% woo-product-timer

Code Review | WPC Product Timer for WooCommerce

WordPress plugin WPC Product Timer for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-product-timer
  • Plugin version: 5.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 13, 2018
  • Latest release: Nov 15, 2023
  • Number of updates: 108
  • Update frequency: every 18.9 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

4,000+ active /139,775 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 gracefully, with no errors

Server metrics [RAM: ▲0.39MB] [CPU: ▼4.36ms] Passed 4 tests

An overview of server-side resources used by WPC Product Timer for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3941.60 ▲1.19
Dashboard /wp-admin3.70 ▲0.3549.78 ▼25.03
Posts /wp-admin/edit.php3.81 ▲0.4551.88 ▲9.14
Add New Post /wp-admin/post-new.php6.30 ▲0.4195.91 ▲5.24
Media Library /wp-admin/upload.php3.62 ▲0.3935.79 ▲1.15
About /wp-admin/admin.php?page=wpclever3.5831.63
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.8033.07

Server storage [IO: ▲0.33MB] [DB: ▲0.02MB] Passed 3 tests

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

Browser metrics Passed 4 tests

WPC Product Timer for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12014.23 ▼0.091.75 ▼0.0943.96 ▼6.66
Dashboard /wp-admin2,260 ▲805.55 ▼0.1689.73 ▼11.9975.58 ▲35.68
Posts /wp-admin/edit.php2,184 ▲1022.00 ▼0.0339.18 ▲0.8135.08 ▼1.90
Add New Post /wp-admin/post-new.php1,596 ▲7023.51 ▲0.26684.90 ▼17.0855.14 ▲4.64
Media Library /wp-admin/upload.php1,468 ▲654.18 ▲0.0199.41 ▲1.1673.32 ▲32.41
About /wp-admin/admin.php?page=wpclever1,4052.1431.4935.38
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7352.1635.8058.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • 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 | 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in woo-product-timer/assets to your readme.txt
The official readme.txt might help

woo-product-timer/wpc-product-timer.php 92% from 13 tests

The primary PHP file in "WPC Product Timer for WooCommerce" version 5.0.6 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-product-timer.php" instead of "wpc-product-timer.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
Success! There were no dangerous files found in this plugin6,913 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4484892,705
PHP5340712,070
CSS4307191,671
PO File2183189438
SVG10029

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity118.25
▷ Minimum class complexity1.00
▷ Maximum class complexity425.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods67
▷ Static methods2029.85%
▷ Public methods67100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants11
▷ Global constants11100.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 are no PNG files in this plugin