89% woocommerce-out-of-stock-message

Code Review | WooCommerce Out of Stock Message

WordPress plugin WooCommerce Out of Stock Message scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-out-o...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Aug 7, 2014
  • Latest release: Aug 8, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: kharisblank (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /6,411 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by WooCommerce Out of Stock Message
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.29 ▲3.29
Dashboard /wp-admin3.34 ▲0.0448.17 ▼3.68
Posts /wp-admin/edit.php3.39 ▲0.0350.44 ▼2.78
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.38 ▼15.92
Media Library /wp-admin/upload.php3.26 ▲0.0337.18 ▲0.45

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Out of Stock Message
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.28 ▼0.341.65 ▼0.6339.16 ▼5.23
Dashboard /wp-admin2,202 ▲255.58 ▲0.0588.69 ▼5.2541.31 ▲1.61
Posts /wp-admin/edit.php2,104 ▲12.05 ▲0.0935.71 ▼7.2234.20 ▼3.61
Add New Post /wp-admin/post-new.php1,532 ▲623.07 ▼0.03604.98 ▼66.8955.36 ▼1.40
Media Library /wp-admin/upload.php1,404 ▲44.16 ▲0.0398.70 ▼20.1644.25 ▼0.58

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Default Note), #2 (Product Write Panel), #3 (Single Product Page)
The official readme.txt is a good inspiration

woocommerce-out-of-stock-message/woocommerce-out-of-stock-message.php 85% from 13 tests

The main PHP script in "WooCommerce Out of Stock Message" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: Please don't use more than 140 characters for the plugin description (currently 224 characters long)

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 detected866 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS6150166542
PHP17831171
HTML160397
JavaScript419536
Sass27020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.69MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png173.75KB54.04KB▼ 68.90%
documentation/assets/02_preview2.png80.73KB23.23KB▼ 71.22%
documentation/images/kharis-sulistiyono-favicon.png11.98KB8.88KB▼ 25.86%
documentation/assets/03_preview3.png173.75KB54.04KB▼ 68.90%
documentation/assets/01_preview1.png90.89KB26.21KB▼ 71.16%