83% product-countdown

Code Review | Product countdown

WordPress plugin Product countdown scored 83% from 54 tests.

About plugin

  • Plugin page: product-countdown
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1.1
  • WordPress version: 6.3.1
  • First release: May 2, 2023
  • Latest release: May 2, 2023
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: wpteamindianic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 243 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Product countdown
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0723.64 ▼19.33
Dashboard /wp-admin3.32 ▲0.0146.48 ▼0.84
Posts /wp-admin/edit.php3.37 ▲0.0148.51 ▲2.60
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.18 ▼15.76
Media Library /wp-admin/upload.php3.24 ▲0.0135.64 ▲1.41

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Product countdown
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲16613.62 ▼0.755.02 ▲2.9038.49 ▼3.20
Dashboard /wp-admin2,221 ▲305.85 ▲0.99107.05 ▲5.0938.25 ▼6.09
Posts /wp-admin/edit.php2,110 ▲212.15 ▲0.1353.52 ▲11.8133.61 ▼2.36
Add New Post /wp-admin/post-new.php1,534 ▲123.15 ▼0.10697.71 ▲51.1952.87 ▼5.37
Media Library /wp-admin/upload.php1,394 ▲34.26 ▲0.08351.56 ▲256.09179.00 ▲135.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
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
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/product-countdown/public/frontside.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-countdown/admin/admin-menu.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-countdown/admin/admin-settings.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/product-countdown/admin/pcd-settings-form.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires at least: Invalid version format
  • Screenshots: Screenshot #1 (Screenshots 1) image missing
The official readme.txt might help

product-countdown/product-countdown.php 77% from 13 tests

The main file in "Product countdown" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages/")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.2")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,398 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5208381,553
CSS67116529
PHP75113282
Markdown113034

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/i.png0.50KB0.63KB0.00%