93% woo-products-coming-soon

Code Review | Woocommerce Products Coming Soon

WordPress plugin Woocommerce Products Coming Soon scored 93% from 54 tests.

About plugin

  • Plugin page: woo-products-comi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8.1
  • WordPress version: 5.8.1
  • First release: Sep 8, 2017
  • Latest release: Sep 8, 2017
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: glorywebs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 831 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼136.68ms] Passed 4 tests

This is a short check of server-side resources used by Woocommerce Products Coming Soon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1429.49 ▲0.39
Dashboard /wp-admin3.07 ▲0.0247.10 ▲6.39
Posts /wp-admin/edit.php3.12 ▲0.0247.64 ▲4.88
Add New Post /wp-admin/post-new.php5.44 ▲0.0098.19 ▼545.56
Media Library /wp-admin/upload.php3.02 ▲0.0132.38 ▼6.41

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Products Coming Soon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,691 ▲9517.10 ▲1.2616.67 ▲8.0750.30 ▲2.91
Dashboard /wp-admin2,973 ▲395.86 ▼0.06150.08 ▲8.88131.60 ▲26.20
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0072.11 ▲7.7994.28 ▲2.49
Add New Post /wp-admin/post-new.php1,683 ▼18918.80 ▼0.33377.45 ▲18.45102.99 ▼4.46
Media Library /wp-admin/upload.php1,807 ▼05.06 ▼0.04142.09 ▲0.91115.04 ▼5.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/woo-products-coming-soon/woocommerce-products-coming-soon.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === woo-products-coming-soon === )
  • Screenshots: Add a description for screenshot #2 in woo-products-coming-soon/assets to your readme.txt
The official readme.txt is a good inspiration

woo-products-coming-soon/woocommerce-products-coming-soon.php 77% from 13 tests

"Woocommerce Products Coming Soon" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "4.4")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-products-coming-soon.php" instead of "woocommerce-products-coming-soon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected4,545 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript38143924,354
PHP23818153
CSS15138

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin