90% product-coming-soon

Code Review | Product Coming Soon for WooCommerce

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

About plugin

  • Plugin page: product-coming-soon
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2022
  • Latest release: Nov 3, 2022
  • Number of updates: 3
  • Update frequency: every 13.7 days
  • Top authors: ahmadshyk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /180 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Product Coming Soon for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.14 ▼5.62
Dashboard /wp-admin3.34 ▼0.0044.64 ▼19.96
Posts /wp-admin/edit.php3.39 ▲0.0450.55 ▲4.51
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.19 ▼15.00
Media Library /wp-admin/upload.php3.26 ▲0.0437.11 ▲0.60

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Product Coming Soon for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.28 ▼1.011.74 ▲0.0437.90 ▼4.73
Dashboard /wp-admin2,212 ▲245.86 ▲0.98111.13 ▼9.5842.82 ▼4.41
Posts /wp-admin/edit.php2,095 ▲92.05 ▲0.0339.78 ▲2.4235.74 ▲1.27
Add New Post /wp-admin/post-new.php1,539 ▼323.06 ▲4.94603.17 ▼70.0261.41 ▲5.57
Media Library /wp-admin/upload.php1,391 ▼04.28 ▲0.06102.37 ▼0.7143.66 ▼7.06

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The SRP test was a success

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: woocommerce, product coming soon, coming soon, coming soon product, coming soon products

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

The main PHP file in "Product Coming Soon for WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("product-coming-soon.php" instead of "product-coming-soon-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected409 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP52520278
CSS10093
JavaScript10038

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.00
▷ Minimum class complexity12.00
▷ Maximum class complexity16.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin