77% smart-coming-soon-mode

Code Review | Smart Coming Soon Mode

WordPress plugin Smart Coming Soon Mode scored 77% from 54 tests.

About plugin

  • Plugin page: smart-coming-soon...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.9.2
  • First release: Dec 11, 2019
  • Latest release: Sep 2, 2021
  • Number of updates: 4
  • Update frequency: every 157.7 days
  • Top authors: webdzier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 314 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.42MB] [CPU: ▲291.54ms] 50% from 4 tests

Analyzing server-side resources used by Smart Coming Soon Mode
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 642.59ms on /wp-admin/admin.php?page=smart-coming-soon-mode&tab=10)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 291.54ms on /wp-admin/admin.php?page=smart-coming-soon-mode&tab=10)
PageMemory (MB)CPU Time (ms)
Home /8.67 ▲5.1272.12 ▲15.58
Dashboard /wp-admin5.11 ▲1.67778.44 ▲743.59
Posts /wp-admin/edit.php5.00 ▲1.32619.24 ▲569.80
Add New Post /wp-admin/post-new.php8.30 ▲1.301,207.93 ▼70.09
Media Library /wp-admin/upload.php4.72 ▲1.38683.46 ▲650.87
General Settings /wp-admin/admin.php?page=smart-coming-soon-mode&tab=19.531,187.61
Contact Info Settings /wp-admin/admin.php?page=smart-coming-soon-mode&tab=99.521,081.14
More Features /wp-admin/admin.php?page=smart-coming-soon-mode&tab=129.52977.38
Advanced Settings /wp-admin/admin.php?page=smart-coming-soon-mode&tab=49.52609.94
Options Object /wp-admin/admin.php?page=smart-coming-soon-mode&tab=139.52634.93
Social Icons Settings /wp-admin/admin.php?page=smart-coming-soon-mode&tab=89.52657.45
Redux Framework /wp-admin/tools.php?page=redux-about4.70601.76
Preview /wp-admin/admin.php?page=smart-coming-soon-mode&tab=119.52613.59
Help /wp-admin/admin.php?page=smart-coming-soon-mode&tab=109.52642.59

Server storage [IO: ▲5.33MB] [DB: ▲0.06MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 435 new files
Database: no new tables, 3 new options
New WordPress options
smart_csm_option-transients
smart_csm_option
redux_version_upgraded_from

Browser metrics Passed 4 tests

Checking browser requirements for Smart Coming Soon Mode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,027 ▲27316.05 ▲0.316.98 ▲0.562.95 ▲0.04
Dashboard /wp-admin3,115 ▲2546.42 ▲0.24122.43 ▼11.84156.32 ▼6.22
Posts /wp-admin/edit.php2,824 ▲1303.29 ▲0.0568.64 ▲3.80140.95 ▲1.10
Add New Post /wp-admin/post-new.php1,753 ▲3622.09 ▲0.83410.24 ▼16.80163.55 ▲0.18
Media Library /wp-admin/upload.php1,836 ▲1415.61 ▲0.07141.22 ▼4.33179.72 ▼10.09
General Settings /wp-admin/admin.php?page=smart-coming-soon-mode&tab=12,9437.36114.58194.75
Contact Info Settings /wp-admin/admin.php?page=smart-coming-soon-mode&tab=92,9267.21112.70180.77
More Features /wp-admin/admin.php?page=smart-coming-soon-mode&tab=122,9447.06112.01212.04
Advanced Settings /wp-admin/admin.php?page=smart-coming-soon-mode&tab=43,2027.65133.85183.04
Options Object /wp-admin/admin.php?page=smart-coming-soon-mode&tab=132,9316.95109.63174.56
Social Icons Settings /wp-admin/admin.php?page=smart-coming-soon-mode&tab=82,9326.85108.39180.03
Redux Framework /wp-admin/tools.php?page=redux-about1,4774.37106.09227.98
Preview /wp-admin/admin.php?page=smart-coming-soon-mode&tab=112,9207.07107.65149.78
Help /wp-admin/admin.php?page=smart-coming-soon-mode&tab=102,9247.11110.41139.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 options in the database
    • smart_csm_option-transients
    • redux_version_upgraded_from

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/smart-coming-soon-mode/admin/ReduxCore/inc/themecheck/checks/embedded.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Redux_Customizer_Control' not found in wp-content/plugins/smart-coming-soon-mode/admin/ReduxCore/inc/extensions/customizer/inc/customizer_fields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/smart-coming-soon-mode/admin/ReduxCore/inc/welcome/views/changelog.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/smart-coming-soon-mode/admin/ReduxCore/templates/panel/menu_container.tpl.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/smart-coming-soon-mode/admin/ReduxCore/inc/fields/select/elusive-icons.php:312
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smart-coming-soon-mode/inc/help.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/smart-coming-soon-mode/admin/ReduxCore/inc/extensions/customizer/inc/customizer_devs.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/smart-coming-soon-mode/admin/ReduxCore/templates/panel/footer.tpl.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/smart-coming-soon-mode/admin/ReduxCore/inc/extensions/customizer/inc/customizer_control.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/smart-coming-soon-mode/admin/ReduxCore/templates/panel/header.tpl.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=smart-coming-soon-mode&tab=1
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=smart-coming-soon-mode&tab=1 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=83eb516c71&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D83eb516c71%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=smart-coming-soon-mode&tab=9
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=smart-coming-soon-mode&tab=9 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=83eb516c71&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D83eb516c71%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=smart-coming-soon-mode&tab=12
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=smart-coming-soon-mode&tab=12 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=83eb516c71&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D83eb516c71%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=smart-coming-soon-mode&tab=4
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=smart-coming-soon-mode&tab=4 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=83eb516c71&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D83eb516c71%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=smart-coming-soon-mode&tab=13
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=smart-coming-soon-mode&tab=13 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=83eb516c71&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D83eb516c71%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=smart-coming-soon-mode&tab=8
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=smart-coming-soon-mode&tab=8 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=83eb516c71&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D83eb516c71%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=smart-coming-soon-mode&tab=11
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=smart-coming-soon-mode&tab=11 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=83eb516c71&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D83eb516c71%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=smart-coming-soon-mode&tab=10
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=smart-coming-soon-mode&tab=10 - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=83eb516c71&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D83eb516c71%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

smart-coming-soon-mode/smart-coming-soon-mode.php 92% from 13 tests

The entry point to "Smart Coming Soon Mode" version 1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 273 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin54,438 lines of code in 307 files:
LanguageFilesBlank linesComment linesLines of code
PHP1093,8215,43116,315
JavaScript893,4462,25615,370
CSS511,2589610,606
Sass541,187607,580
SVG2003,605
JSON11840909
LESS10053

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity32.52
▷ Minimum class complexity1.00
▷ Maximum class complexity882.00
Average method complexity6.57
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes102
▷ Abstract classes00.00%
▷ Concrete classes102100.00%
▷ Final classes00.00%
Methods578
▷ Static methods10117.47%
▷ Public methods43775.61%
▷ Protected methods9115.74%
▷ Private methods508.65%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants60
▷ Global constants35.00%
▷ Class constants5795.00%
▷ Public constants57100.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
34 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/ReduxCore/assets/img/1col.png2.83KB0.14KB▼ 95.13%
admin/ReduxCore/assets/img/3cl.png3.08KB0.33KB▼ 89.13%
admin/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
admin/ReduxCore/assets/img/menu_icon.png1.41KB0.50KB▼ 64.62%
admin/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%