77% hm-woocommerce-coming-soon

Code Review | Hm woocommerce coming soon plugin

WordPress plugin Hm woocommerce coming soon plugin scored77%from 54 tests.

About plugin

  • Plugin page: hm-woocommerce-co...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 11, 2017
  • Latest release: Jul 11, 2017
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: shimulwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.14MB] [CPU: ▼24.59ms] Passed 4 tests

This is a short check of server-side resources used by Hm woocommerce coming soon plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0322.84 ▼18.97
Dashboard /wp-admin3.16 ▼0.1826.23 ▼40.00
Posts /wp-admin/edit.php3.30 ▼0.0532.32 ▼17.02
Add New Post /wp-admin/post-new.php5.54 ▼0.3475.61 ▼22.36
Media Library /wp-admin/upload.php3.25 ▲0.0225.13 ▼8.41

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
recovery_mode_email_last_sent
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Hm woocommerce coming soon plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,385 ▼3867.79 ▼6.710.46 ▼1.686.49 ▼38.66
Dashboard /wp-admin2,215 ▲304.92 ▼0.98114.07 ▲9.1950.46 ▲3.44
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.0237.04 ▼1.8330.32 ▼2.31
Add New Post /wp-admin/post-new.php1,522 ▼023.14 ▼0.03646.20 ▼5.5967.25 ▲7.58
Media Library /wp-admin/upload.php1,397 ▲124.37 ▲0.1599.76 ▲4.9944.50 ▲0.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/templates/hm_comingsoon_theme5.php
    • > /wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/templates/hm_comingsoon_theme4.php
    • > /wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/templates/hm_comingsoon_theme2.php
    • > /wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/templates/hm_comingsoon_theme3.php
    • > /wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/templates/hm_comingsoon_theme1.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/inc/setting.php:15
    • > PHP Notice
      Undefined variable: _available_on in wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/templates/hm_comingsoon_theme2.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/hm-woocommerce-coming-soon/hm-woocomerce-coming.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/inc/enable-coming-soon.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/hm-woocommerce-coming-soon-scripts.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hm-woocommerce-coming-soon/hm-woocommerce-assets/inc/page-view.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
  • Screenshots: Please add descriptions for these screenshots #3, #4 in hm-woocommerce-coming-soon/assets to your readme.txt
Please take inspiration from this readme.txt

hm-woocommerce-coming-soon/hm-woocomerce-coming.php 85% from 13 tests

The main file in "Hm woocommerce coming soon plugin" v. 1.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:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hm-woocommerce-coming-soon.php" instead of "hm-woocomerce-coming.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin2,163 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52111101,573
PHP1019265488
CSS43227102

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
hm-woocommerce-assets/assets/css/img/digit-xs.png20.40KB9.70KB▼ 52.46%
hm-woocommerce-assets/assets/css/img/digit-lg.png72.06KB24.63KB▼ 65.81%
hm-woocommerce-assets/assets/css/img/digit-md.png65.02KB24.77KB▼ 61.90%
hm-woocommerce-assets/assets/css/img/digit-sm.png31.53KB15.99KB▼ 49.29%