83% woo-countdown-sale-product

Code Review | C4D Woo Countdown Sale Product

WordPress plugin C4D Woo Countdown Sale Product scored83%from 54 tests.

About plugin

  • Plugin page: woo-countdown-sal...
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Jul 26, 2018
  • Number of updates: 48
  • Update frequency: every 13.2 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,460 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.26ms] Passed 4 tests

Server-side resources used by C4D Woo Countdown Sale Product
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.26 ▼0.86
Dashboard /wp-admin3.34 ▲0.0451.14 ▼7.21
Posts /wp-admin/edit.php3.39 ▲0.0447.82 ▼5.01
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.94 ▲0.04
Media Library /wp-admin/upload.php3.26 ▲0.0437.09 ▲1.87

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for C4D Woo Countdown Sale Product
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.42 ▼0.9410.31 ▲8.6644.01 ▲0.78
Dashboard /wp-admin2,195 ▲185.65 ▲0.0093.63 ▲1.8240.80 ▼2.75
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0637.71 ▲2.0031.79 ▼4.08
Add New Post /wp-admin/post-new.php1,526 ▼022.99 ▼0.34646.96 ▼60.2054.81 ▼3.03
Media Library /wp-admin/upload.php1,394 ▼64.19 ▼0.01104.46 ▼3.5243.54 ▼5.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woocommerce_show_product_loop_sale_flash() in wp-content/plugins/woo-countdown-sale-product/templates/default.php:9

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 90% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt might help

woo-countdown-sale-product/c4d-woo-countdown.php 85% from 13 tests

"C4D Woo Countdown Sale Product" version 2.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-countdown-sale-product.php" instead of "c4d-woo-countdown.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin281 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2219216
CSS20154
Sass1009
JavaScript2092

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.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
No PNG files were detected