83% flash-sale-countdown-for-woocommerce

Code Review | Sale Countdown WooCommerce

WordPress plugin Sale Countdown WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: flash-sale-countd...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4
  • WordPress version: 6.3.1
  • First release: Apr 18, 2020
  • Latest release: Apr 20, 2020
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: tomiup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,171 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by Sale Countdown WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.12 ▼11.88
Dashboard /wp-admin3.32 ▼0.0249.76 ▼18.14
Posts /wp-admin/edit.php3.37 ▲0.0247.24 ▼12.77
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.53 ▼26.60
Media Library /wp-admin/upload.php3.24 ▲0.0238.29 ▼0.21

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Sale Countdown WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.454.92 ▲2.4743.53 ▼2.54
Dashboard /wp-admin2,203 ▲124.86 ▼0.03103.79 ▼26.5843.80 ▼10.40
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0136.38 ▼1.9232.83 ▼1.08
Add New Post /wp-admin/post-new.php1,533 ▲1423.13 ▼0.31661.21 ▲6.1452.31 ▼4.36
Media Library /wp-admin/upload.php1,391 ▼04.29 ▲0.07103.84 ▲1.3343.74 ▼2.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/flash-sale-countdown-for-woocommerce/flash-sale-countdown.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_id() on null in wp-content/plugins/flash-sale-countdown-for-woocommerce/templates/archive-countdown.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_id() on null in wp-content/plugins/flash-sale-countdown-for-woocommerce/templates/single-countdown.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/flash-sale-countdown-for-woocommerce/flash-sale-countdown.php:21
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/flash-sale-countdown-for-woocommerce/flash-sale-countdown.php on line 20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/flash-sale-countdown-for-woocommerce/flash-sale-countdown.php on line 20

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

flash-sale-countdown-for-woocommerce/flash-sale-countdown.php 77% from 13 tests

This is the main PHP file of "Sale Countdown WooCommerce" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("flash-sale-countdown-for-woocommerce.php" instead of "flash-sale-countdown.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.8.2" instead of "4.4")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin197 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP31522113
JavaScript1141046
CSS17138

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin