78% coming-soon-for-woocommerce

Code Review | Coming Soon Badge for WooCommerce

WordPress plugin Coming Soon Badge for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: coming-soon-for-w...
  • Plugin version: 1.0.15
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2020
  • Latest release: Jun 26, 2023
  • Number of updates: 36
  • Update frequency: every 25.8 days
  • Top authors: wpcentrics (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 13,911 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
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.59ms] Passed 4 tests

An overview of server-side resources used by Coming Soon Badge for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1336.83 ▼3.57
Dashboard /wp-admin3.43 ▲0.1245.64 ▼7.38
Posts /wp-admin/edit.php3.54 ▲0.1947.57 ▲2.66
Add New Post /wp-admin/post-new.php6.03 ▲0.1491.67 ▼3.06
Media Library /wp-admin/upload.php3.35 ▲0.1235.42 ▼0.35
Coming Soon config /wp-admin/admin.php?page=coming-soon-wc-opts3.4535.88

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Coming Soon Badge for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲14813.93 ▼0.454.30 ▲2.3737.06 ▼8.81
Dashboard /wp-admin2,208 ▲205.85 ▲0.9799.22 ▼17.9539.71 ▼8.37
Posts /wp-admin/edit.php2,094 ▲52.04 ▼0.0138.53 ▼0.6032.02 ▼2.41
Add New Post /wp-admin/post-new.php1,544 ▲3018.46 ▲0.95635.83 ▼37.5069.39 ▲17.70
Media Library /wp-admin/upload.php1,390 ▼14.17 ▼0.06104.47 ▲6.9541.07 ▼3.74
Coming Soon config /wp-admin/admin.php?page=coming-soon-wc-opts1,8903.6681.6983.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • coming-soon-for-woocommerce
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/coming-soon-for-woocommerce/inc/discover-fns.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant COMING_SOON_WC_URL - assumed 'COMING_SOON_WC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/coming-soon-for-woocommerce/inc/discover-fns.php on line 19
    • > PHP Warning
      Use of undefined constant COMING_SOON_WC_URL - assumed 'COMING_SOON_WC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/coming-soon-for-woocommerce/inc/discover-fns.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_options() on null in wp-content/plugins/coming-soon-for-woocommerce/inc/wizard.php:17
    • > PHP Warning
      Use of undefined constant COMING_SOON_WC_URL - assumed 'COMING_SOON_WC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/coming-soon-for-woocommerce/inc/discover-fns.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: badge, product badge, woocommerce badge, coming soon

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

The main PHP file in "Coming Soon Badge for WooCommerce" ver. 1.0.15 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.4" instead of "4.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,381 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5286302966
JavaScript36628211
CSS1167199
XML1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity55.50
▷ Minimum class complexity13.00
▷ Maximum class complexity98.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods13.12%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 0.33MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/coming_soon_1.png18.18KB6.58KB▼ 63.79%
assets/img/coming_soon_3.png28.71KB9.87KB▼ 65.61%
assets/img/product-demo.png76.05KB36.39KB▼ 52.16%
assets/img/coming_soon_5.png59.16KB30.95KB▼ 47.68%
assets/img/coming_soon_7.png29.29KB14.14KB▼ 51.73%