84% woo-coming-soon

Code Review | Woo Coming Soon

WordPress plugin Woo Coming Soon scored84%from 54 tests.

About plugin

  • Plugin page: woo-coming-soon
  • Plugin version: 1.4.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 11, 2017
  • Latest release: Aug 4, 2023
  • Number of updates: 53
  • Update frequency: every 40.6 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /33,865 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.73MB] [CPU: ▼6.55ms] Passed 4 tests

Analyzing server-side resources used by Woo Coming Soon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8534.29 ▼4.01
Dashboard /wp-admin4.05 ▲0.7055.12 ▼6.29
Posts /wp-admin/edit.php4.10 ▲0.7448.82 ▲8.91
Add New Post /wp-admin/post-new.php6.64 ▲0.7588.61 ▼19.59
Media Library /wp-admin/upload.php3.97 ▲0.7442.38 ▲3.69
Coming Soon /wp-admin/options-general.php?page=woo_cs_general4.0139.14

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Coming Soon
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,463 ▼29814.30 ▼0.340.58 ▼1.0518.73 ▼28.27
Dashboard /wp-admin2,207 ▲295.59 ▼0.1189.78 ▼23.8941.68 ▼4.60
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0736.95 ▼0.3430.95 ▼6.65
Add New Post /wp-admin/post-new.php1,536 ▲123.23 ▲5.02651.97 ▲12.7981.78 ▼3.27
Media Library /wp-admin/upload.php1,409 ▲94.20 ▼0.0197.35 ▲4.5342.20 ▲2.40
Coming Soon /wp-admin/options-general.php?page=woo_cs_general1,0083.2638.3477.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require(wp-content/plugins/woo-coming-soon/inc/templates/wp-blog-header.php): failed to open stream: No such file or directory in wp-content/plugins/woo-coming-soon/inc/templates/actual_index.php on line 17
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/woo-coming-soon/inc/templates/wp-blog-header.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-coming-soon/inc/templates/actual_index.php on line 17
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-coming-soon/index.php on line 16
    • > PHP Warning
      require(./wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/woo-coming-soon/inc/templates/index.php on line 29
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/woo-coming-soon/index.php on line 16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-coming-soon/index.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-coming-soon/inc/functions.php:37
    • > PHP Fatal error
      require(): Failed opening required './wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-coming-soon/inc/templates/index.php on line 29

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: products, coming soon, woocommerce, coming soon page

woo-coming-soon/index.php 92% from 13 tests

The primary PHP file in "Woo Coming Soon" version 1.4.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-coming-soon.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected14,907 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,445
PHP81,4986133,529
CSS576651,569
PO File3129133339
JavaScript341125

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.42
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods151
▷ Static methods6140.40%
▷ Public methods14596.03%
▷ Protected methods00.00%
▷ Private methods63.97%
Functions29
▷ Named functions2896.55%
▷ Anonymous functions13.45%
Constants34
▷ Global constants34100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.44MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
css/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
css/images/cal_logo.png2.12KB0.97KB▼ 54.53%
img/notice-styles.png30.85KB11.83KB▼ 61.66%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%