77% maintenance-mode-coming-soon

Code Review | Maintenance Mode & Coming Soon

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

About plugin

  • Plugin page: maintenance-mode-...
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.4
  • WordPress version: 6.3.1
  • First release: Apr 10, 2017
  • Latest release: Apr 9, 2020
  • Number of updates: 16
  • Update frequency: every 68.4 days
  • Top authors: akshitsethi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,636 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼3.83ms] Passed 4 tests

A check of server-side resources used by Maintenance Mode & Coming Soon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3839.17 ▼3.09
Dashboard /wp-admin3.68 ▲0.3754.39 ▲5.97
Posts /wp-admin/edit.php3.79 ▲0.4351.63 ▼0.91
Add New Post /wp-admin/post-new.php6.26 ▲0.3787.03 ▼14.68
Media Library /wp-admin/upload.php3.60 ▲0.3739.71 ▲3.38
Maintenance Mode & Coming Soon /wp-admin/options-general.php?page=mmcs_options3.7842.41

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 481 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
as_mmcs

Browser metrics Passed 4 tests

A check of browser resources used by Maintenance Mode & Coming Soon
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.29 ▼1.341.68 ▼0.3042.60 ▼7.16
Dashboard /wp-admin2,210 ▲195.80 ▲0.9097.22 ▼3.1237.26 ▼9.63
Posts /wp-admin/edit.php2,093 ▲12.02 ▼0.0438.65 ▼2.4234.82 ▼6.17
Add New Post /wp-admin/post-new.php1,537 ▲1623.19 ▼0.01649.17 ▼26.3850.46 ▼9.37
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.0394.14 ▼17.9743.22 ▼4.47
Maintenance Mode & Coming Soon /wp-admin/options-general.php?page=mmcs_options12,2405.70123.8293.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/maintenance-mode-coming-soon/inc/admin/views/footer.php
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AkshitSethi\\Plugins\\MaintenanceMode\\Config' not found in wp-content/plugins/maintenance-mode-coming-soon/inc/admin/views/header.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/maintenance-mode-coming-soon/inc/admin/views/settings-advanced.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/maintenance-mode-coming-soon/inc/views/blank.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/maintenance-mode-coming-soon/inc/views/html.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/maintenance-mode-coming-soon/inc/admin/views/settings-support.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/maintenance-mode-coming-soon/inc/admin/views/settings-social.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/maintenance-mode-coming-soon/inc/admin/views/settings-design.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/maintenance-mode-coming-soon/inc/admin/views/settings-about.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/maintenance-mode-coming-soon/inc/admin/views/settings-form.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AkshitSethi\\Plugins\\MaintenanceMode\\plugin_dir_url() in wp-content/plugins/maintenance-mode-coming-soon/inc/class-config.php:772

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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
Please fix the following attributes:
  • Tags: There are too many tags (15 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #3 (See how perfectly it adapts to mobile), #4 (Mobile optimized admin panel of the plugin), #5 (Submit support ticket from the options panel itself)
Please take inspiration from this readme.txt

maintenance-mode-coming-soon/maintenance-mode-coming-soon.php 85% from 13 tests

"Maintenance Mode & Coming Soon" version 1.5.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("i18n")
  • Domain Path: Prefix the domain path with a forward slash character ("/i18n")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected11,876 lines of code in 451 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4118362734,502
PHP306619093,306
SVG1002,671
CSS330841,124
Markdown2800162
JSON320100
Bourne Shell14011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity26.40
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods85
▷ Static methods910.59%
▷ Public methods6677.65%
▷ Protected methods00.00%
▷ Private methods1922.35%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/close.png0.43KB0.33KB▼ 24.43%
assets/admin/images/logo.png4.21KB1.45KB▼ 65.55%
assets/admin/images/lrg-icon.png16.22KB3.92KB▼ 75.81%
assets/admin/images/twitter.png2.07KB0.63KB▼ 69.73%
assets/admin/images/facebook.png1.82KB0.59KB▼ 67.51%