77% under-construction-maintenance-mode

Code Review | Under Construction, Coming Soon & Maintenance Mode

WordPress plugin Under Construction, Coming Soon & Maintenance Mode scored77%from 54 tests.

About plugin

  • Plugin page: under-constructio...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 25, 2017
  • Latest release: Nov 7, 2023
  • Number of updates: 37
  • Update frequency: every 66.1 days
  • Top authors: WPBrigade (81.08%)hiddenpearls (16.22%)AbdulWahab610 (8.11%)

Code review

54 tests

User reviews

29 reviews

Install metrics

10,000+ active /106,601 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
Installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▲1.51ms] Passed 4 tests

A check of server-side resources used by Under Construction, Coming Soon & Maintenance Mode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4143.57 ▲2.73
Dashboard /wp-admin3.75 ▲0.4463.04 ▲12.61
Posts /wp-admin/edit.php3.80 ▲0.4461.63 ▲9.51
Add New Post /wp-admin/post-new.php6.27 ▲0.3889.40 ▼11.78
Media Library /wp-admin/upload.php3.59 ▲0.3640.39 ▲5.58
Customizer /wp-admin/admin.php?page=under-construction-maintenance-mode3.5636.99
Help /wp-admin/admin.php?page=ucmm-help3.6041.20
Settings /wp-admin/admin.php?page=ucmm_settings3.5838.65

Server storage [IO: ▲1.25MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
ucmm_wpbrigade_setting
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Under Construction, Coming Soon & Maintenance Mode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲21914.62 ▲0.271.87 ▲0.2343.42 ▲3.98
Dashboard /wp-admin2,389 ▲2126.31 ▲0.80118.99 ▲25.6742.44 ▲3.22
Posts /wp-admin/edit.php2,314 ▲2173.69 ▲1.7553.67 ▲13.5335.62 ▼1.82
Add New Post /wp-admin/post-new.php1,570 ▲3523.42 ▼1.59675.67 ▲33.0940.02 ▼25.20
Media Library /wp-admin/upload.php1,457 ▲604.37 ▲0.1586.47 ▼17.7343.80 ▲0.27
Customizer /wp-admin/admin.php?page=under-construction-maintenance-mode8,86722.11625.69117.99
Help /wp-admin/admin.php?page=ucmm-help1,0253.2340.4265.40
Settings /wp-admin/admin.php?page=ucmm_settings1,1843.6250.2932.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • ucmm_wpbrigade_setting

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 no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/under-construction-maintenance-mode/under-construction-maintenance-mode.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/under-construction-maintenance-mode/lib/wpb-sdk/views/wpb-sdk-deactivate-form.php:109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/under-construction-maintenance-mode/ucmm-customize.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/under-construction-maintenance-mode/classes/plugin-meta.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/under-construction-maintenance-mode/includes/deactivate_modal.php:88
    • > PHP Notice
      Undefined variable: product_slug in wp-content/plugins/under-construction-maintenance-mode/lib/wpb-sdk/views/wpb-sdk-deactivate-form.php on line 103

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=under-construction-maintenance-mode
    • > Network (severe)
    ucmm-customize.php?watch=ucmm-customizer&customize_changeset_uuid=647e250e-2d5e-499e-a993-1f511b956a55&customize_theme=twentytwentyone&customize_messenger_channel=preview-0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=under-construction-maintenance-mode
    • > Security (warning) in unknown
    /ucmm-customize.php?watch=ucmm-customizer&customize_changeset_uuid=647e250e-2d5e-499e-a993-1f511b956a55&customize_theme=twentytwentyone&customize_messenger_channel=preview-0 - An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Invalid URI ("Author URI: https://wpbrigade.com/?utm_source=ucmm-org&utm_medium=donate-url-link")
  • Screenshots: These screenshots lack descriptions #2, #3 in under-construction-maintenance-mode/assets to your readme.txt
The official readme.txt is a good inspiration

under-construction-maintenance-mode/under-construction-maintenance-mode.php 77% from 13 tests

The main PHP script in "Under Construction, Coming Soon & Maintenance Mode" version 1.5.1 is automatically included on every request by WordPress
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
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "4.0")
  • Description: Please don't use more than 140 characters for the plugin description (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin6,006 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP135817892,539
CSS5946192,067
SVG1041,007
JavaScript24683392
Markdown1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.62
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods94
▷ Static methods1010.64%
▷ Public methods8792.55%
▷ Protected methods00.00%
▷ Private methods77.45%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
2 PNG files occupy 0.21MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/coming-soon.png71.89KB25.28KB▼ 64.83%
img/review-icon.png141.16KB53.59KB▼ 62.04%