73% rocket-maintenance-mode

Code Review | Rocket Maintenance Mode & Coming Soon Page

WordPress plugin Rocket Maintenance Mode & Coming Soon Page scored73%from 54 tests.

About plugin

  • Plugin page: rocket-maintenanc...
  • Plugin version: 4.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0
  • WordPress version: 6.3.1
  • First release: May 2, 2014
  • Latest release: May 24, 2022
  • Number of updates: 75
  • Update frequency: every 39.3 days
  • Top authors: Muneeb (60%)wpexpertsio (25.33%)WebFactory (17.33%)

Code review

54 tests

User reviews

23 reviews

Install metrics

8,000+ active /379,527 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲4.92MB] [CPU: ▲20.51ms] Passed 4 tests

This is a short check of server-side resources used by Rocket Maintenance Mode & Coming Soon Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.79 ▲5.3279.97 ▲44.52
Dashboard /wp-admin8.81 ▲5.5067.46 ▲21.86
Posts /wp-admin/edit.php8.81 ▲5.4578.54 ▲27.46
Add New Post /wp-admin/post-new.php9.28 ▲3.40103.73 ▲2.68
Media Library /wp-admin/upload.php8.81 ▲5.5866.15 ▲30.03
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.8156.56

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 338 new files
Database: no new tables, 58 new options
New WordPress options
mmp_show_insta
fs_gdpr
mmp_fft
mmp_on_off_subscribe
widget_theysaidso_widget
mmp_show_fb
fs_active_plugins
mmp_mc_sbt
mmp_background_image
mmp_set_dateTime
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rocket Maintenance Mode & Coming Soon Page
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.17 ▼0.111.97 ▲0.3534.14 ▼10.84
Dashboard /wp-admin2,231 ▲515.66 ▲0.0181.42 ▼4.2138.57 ▼8.04
Posts /wp-admin/edit.php2,137 ▲372.00 ▲0.0336.10 ▼2.4032.73 ▼6.76
Add New Post /wp-admin/post-new.php1,547 ▲2123.37 ▼0.19681.56 ▲12.1661.77 ▲7.89
Media Library /wp-admin/upload.php1,436 ▲334.23 ▲0.0795.70 ▼3.9847.87 ▲1.89
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0731.6623.4828.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/rocket-maintenance-mode/includes/libs/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 58 options in the database
    • mmp_http_503
    • mmp_links_hover_color
    • mmp_fb_page
    • mmp_notificationx_notification
    • mmp_text_color
    • mmp_headline
    • mmp_on_off
    • mmp_mc_api
    • widget_theysaidso_widget
    • fs_accounts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/rocket-maintenance-mode/views/admin-settings/general-meta-box.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rocket-maintenance-mode/views/admin-settings/add-hooktohead.php:1
    • > PHP Warning
      include(WPMMP_PLUGIN_INCLUDE_DIRECTORYlibs/MailChimp.php): failed to open stream: No such file or directory in wp-content/plugins/rocket-maintenance-mode/views/admin-settings/add-email-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rocket-maintenance-mode/config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rocket-maintenance-mode/includes/functions.php:251
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rocket-maintenance-mode/views/admin-settings/add-email-form.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Wpmmp_Theme_Handler' not found in wp-content/plugins/rocket-maintenance-mode/includes/classes/class-wpmmp-default-theme.php:3
    • > PHP Warning
      Use of undefined constant WPMMP_PLUGIN_INCLUDE_DIRECTORY - assumed 'WPMMP_PLUGIN_INCLUDE_DIRECTORY' (this will throw an Error in a future version of PHP) in wp-content/plugins/rocket-maintenance-mode/views/admin-settings/add-email-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Wpmmp_Theme_Handler' not found in wp-content/plugins/rocket-maintenance-mode/includes/classes/class-wpmmp-launch-theme.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rocket-maintenance-mode/includes/tabs.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: maintenance, under construction page, maintenance mode page, coming soon page, under construction...

rocket-maintenance-mode/wp-wpmmp.php 92% from 13 tests

Analyzing the main PHP file in "Rocket Maintenance Mode & Coming Soon Page" version 4.3
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rocket-maintenance-mode.php" instead of "wp-wpmmp.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin44,925 lines of code in 159 files:
LanguageFilesBlank linesComment linesLines of code
PHP1318,35918,26035,142
CSS17133386,967
JavaScript87422972,346
SVG100229
Markdown1680214
JSON10027

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity76.13
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,314
▷ Static methods17513.32%
▷ Public methods96473.36%
▷ Protected methods151.14%
▷ Private methods33525.49%
Functions121
▷ Named functions121100.00%
▷ Anonymous functions00.00%
Constants142
▷ Global constants11681.69%
▷ Class constants2618.31%
▷ Public constants26100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.72MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/alissa-1.png91.11KB36.52KB▼ 59.92%
images/fake-logo.png13.80KB8.71KB▼ 36.92%
includes/libs/freemius/assets/img/rocket-maintenance-mode.png11.36KB5.20KB▼ 54.24%
images/nx-logo.png10.24KB3.97KB▼ 61.23%
images/twitter.png0.92KB0.91KB▼ 1.59%