10% coming-soon-product-for-woocommerce

Code Review | Coming Soon Product for WooCommerce

WordPress plugin Coming Soon Product for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: coming-soon-produ...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2016
  • Latest release: Nov 24, 2016
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: terrytsang (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,462 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/coming-soon-product-for-woocommerce/woocommerce-coming-soon-product.php+249
    Use of undefined constant WOOCOMMERCE_VERSION - assumed 'WOOCOMMERCE_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.89MB] [CPU: ▼54.85ms] Passed 4 tests

An overview of server-side resources used by Coming Soon Product for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.56 ▼37.53
Dashboard /wp-admin2.11 ▼1.196.20 ▼49.31
Posts /wp-admin/edit.php2.11 ▼1.247.24 ▼41.54
Add New Post /wp-admin/post-new.php2.11 ▼3.777.93 ▼91.03
Media Library /wp-admin/upload.php2.11 ▼1.126.39 ▼32.55

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Coming Soon Product for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.34 ▼0.001.98 ▲0.2439.16 ▼9.95
Dashboard /wp-admin2,201 ▲245.55 ▼0.1289.80 ▼4.5941.63 ▼3.09
Posts /wp-admin/edit.php2,109 ▲122.02 ▲0.0135.50 ▼4.5134.18 ▲0.04
Add New Post /wp-admin/post-new.php1,553 ▲2023.00 ▲0.04622.41 ▼61.3350.08 ▲0.22
Media Library /wp-admin/upload.php1,409 ▲94.22 ▲0.12100.26 ▼15.5047.78 ▼1.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/coming-soon-product-for-woocommerce/woocommerce-coming-soon-product.php+249
    Use of undefined constant WOOCOMMERCE_VERSION - assumed 'WOOCOMMERCE_VERSION' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 ([screenhot-1.png] Product Data (Inventory Tab)), #2 ([screenhot-2.png] Single Product Page)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === coming-soon-product-for-woocommerce === )
You can take inspiration from this readme.txt

coming-soon-product-for-woocommerce/woocommerce-coming-soon-product.php 92% from 13 tests

The main file in "Coming Soon Product for WooCommerce" 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:
  • Main file name: Name the main plugin file the same as the plugin slug ("coming-soon-product-for-woocommerce.php" instead of "woocommerce-coming-soon-product.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin494 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8110331379
PO File1284691
CSS13024

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods20
▷ Static methods420.00%
▷ Public methods1995.00%
▷ Protected methods00.00%
▷ Private methods15.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.11MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-2.png38.00KB0.00KB▼ 100.00%
(invalid) screenshot-1.png78.58KB0.00KB▼ 100.00%