83% logicrays-wp-product-count-down

Code Review | Logicrays WP Product Count Down

WordPress plugin Logicrays WP Product Count Down scored83%from 54 tests.

About plugin

  • Plugin page: logicrays-wp-prod...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 27, 2018
  • Latest release: Apr 27, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: logicrays (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /552 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.04MB] [CPU: ▼6.51ms] Passed 4 tests

This is a short check of server-side resources used by Logicrays WP Product Count Down
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0449.36 ▲8.39
Dashboard /wp-admin3.34 ▲0.0447.42 ▼8.44
Posts /wp-admin/edit.php3.40 ▲0.0447.51 ▼5.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.97 ▼16.45
Media Library /wp-admin/upload.php3.27 ▲0.0441.25 ▲4.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Logicrays WP Product Count Down
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.35 ▲0.071.86 ▲0.1739.08 ▼3.68
Dashboard /wp-admin2,199 ▲255.49 ▼0.1687.88 ▼4.1141.01 ▼2.96
Posts /wp-admin/edit.php2,113 ▲62.00 ▼0.0236.19 ▼1.7939.16 ▲5.20
Add New Post /wp-admin/post-new.php1,436 ▼9022.13 ▼1.55541.14 ▼156.7331.57 ▼24.57
Media Library /wp-admin/upload.php1,407 ▲74.15 ▼0.0594.80 ▼10.9138.70 ▼6.92

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 were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logicrays-wp-product-count-down/admin/lr-wp-product-count-down.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/logicrays-wp-product-count-down/1.0/wooCommerce-product-count-down.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logicrays-wp-product-count-down/1.0/admin/lr-wp-product-count-down.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/logicrays-wp-product-count-down/wooCommerce-product-count-down.php:10

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 issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Stable tag: No string
  • Tags: There are too many tags (16 tag instead of maximum 10)
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png)
The official readme.txt might help

logicrays-wp-product-count-down/wooCommerce-product-count-down.php 92% from 13 tests

The main PHP script in "Logicrays WP Product Count Down" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("logicrays-wp-product-count-down.php" instead of "wooCommerce-product-count-down.php")

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
Success! There were no dangerous files found in this plugin3,646 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43191242,489
CSS27024767
PHP27338390

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.83MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png284.18KB105.29KB▼ 62.95%
1.0/screenshot-2.png136.83KB45.21KB▼ 66.96%
screenshot-2.png136.83KB45.21KB▼ 66.96%
1.0/image/amazon-logo.png5.33KB5.65KB0.00%
1.0/screenshot-1.png284.18KB105.29KB▼ 62.95%