78% product-launch-countdown

Code Review | Product Launch Countdown Widget

WordPress plugin Product Launch Countdown Widget scored78%from 54 tests.

About plugin

  • Plugin page: product-launch-co...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6
  • WordPress version: 6.3.1
  • First release: Aug 18, 2013
  • Latest release: Dec 2, 2013
  • Number of updates: 3
  • Update frequency: every 35.0 days
  • Top authors: MMDeveloper (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,138 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.28ms] Passed 4 tests

A check of server-side resources used by Product Launch Countdown Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.31 ▼3.02
Dashboard /wp-admin3.34 ▲0.0350.78 ▼2.74
Posts /wp-admin/edit.php3.39 ▲0.0354.44 ▲5.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.30 ▼11.48
Media Library /wp-admin/upload.php3.26 ▲0.0341.21 ▲4.11
All Widgets /wp-admin/edit.php?post_type=plc-widget3.3039.03
Add New /wp-admin/post-new.php?post_type=plc-widget3.4053.94

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Product Launch Countdown Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲21013.74 ▼1.015.03 ▲3.1439.38 ▼2.05
Dashboard /wp-admin2,251 ▲605.01 ▲0.11115.89 ▲10.6841.40 ▼3.02
Posts /wp-admin/edit.php2,137 ▲482.28 ▲0.1441.09 ▲3.3235.92 ▲1.18
Add New Post /wp-admin/post-new.php1,553 ▲2023.19 ▲0.09675.53 ▼10.6666.31 ▲12.57
Media Library /wp-admin/upload.php1,433 ▲484.27 ▲0.02100.65 ▼18.5343.77 ▼4.10
All Widgets /wp-admin/edit.php?post_type=plc-widget1,0982.2236.6928.46
Add New /wp-admin/post-new.php?post_type=plc-widget2,1747.75170.9963.69

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_productlaunchcountdown_widgets_widget
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/product-launch-countdown/includes/class-product-launch-countdown-widgets-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/product-launch-countdown/includes/class-product-launch-countdown-widgets-widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=plc-widget
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).ckeditor is not a function" "TypeError: jQuery(...).ckeditor is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=plc-widget:259:39)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=plc-widget
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).ckeditor is not a function
    • > GET request to /wp-admin/post-new.php?post_type=plc-widget
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).ckeditor is not a function" "TypeError: jQuery(...).ckeditor is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=plc-widget:398:39)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

product-launch-countdown/product-launch-countdown-widgets.php 92% from 13 tests

"Product Launch Countdown Widget" version 1.1'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: The principal plugin file should be the same as the plugin slug ("product-launch-countdown.php" instead of "product-launch-countdown-widgets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected502 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP34451260
JavaScript41420162
CSS210080

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.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
18 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/custom_tr.png0.22KB0.14KB▼ 36.04%
images/datepicker_t.png0.14KB0.12KB▼ 15.00%
images/custom_tl.png0.16KB0.11KB▼ 33.33%
images/custom_br.png0.22KB0.15KB▼ 32.16%
images/custom_t.png0.16KB0.11KB▼ 32.08%