83% maintenance-page

Code Review | Maintenance Page

WordPress plugin Maintenance Page scored83%from 54 tests.

About plugin

  • Plugin page: maintenance-page
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.3
  • WordPress version: 6.3.1
  • First release: Nov 7, 2014
  • Latest release: Aug 11, 2015
  • Number of updates: 31
  • Update frequency: every 9.0 days
  • Top authors: ThemeGrill (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

5,000+ active /92,936 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼2.75ms] Passed 4 tests

Server-side resources used by Maintenance Page
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1641.04 ▼2.40
Dashboard /wp-admin3.60 ▲0.2958.17 ▲7.02
Posts /wp-admin/edit.php3.65 ▲0.2955.86 ▲4.82
Add New Post /wp-admin/post-new.php6.09 ▲0.2093.45 ▼13.65
Media Library /wp-admin/upload.php3.44 ▲0.2040.15 ▲0.25
Maintenance Page /wp-admin/options-general.php?page=mp_settings_api3.4841.89

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 28 new files
Database: 1 new table, 9 new options
New tables
wp_maintenance_page
New WordPress options
mp_basics
widget_theysaidso_widget
theysaidso_admin_options
mp_subscribe
can_compress_scripts
widget_recent-posts
db_upgraded
mp_social
widget_recent-comments

Browser metrics Passed 4 tests

Maintenance Page: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20114.87 ▲0.601.99 ▼0.4343.17 ▲0.98
Dashboard /wp-admin2,365 ▲1886.33 ▲0.73119.50 ▲27.9940.00 ▼6.93
Posts /wp-admin/edit.php2,293 ▲1963.49 ▲1.5249.59 ▲9.3834.30 ▲1.95
Add New Post /wp-admin/post-new.php1,544 ▲1823.62 ▲0.45650.10 ▼45.7639.33 ▼12.30
Media Library /wp-admin/upload.php1,429 ▲294.31 ▲0.1294.60 ▼27.7647.34 ▼1.28
Maintenance Page /wp-admin/options-general.php?page=mp_settings_api2,3348.19188.92111.88

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_email() in wp-content/plugins/maintenance-page/includes/lib/subscriber_handler.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/maintenance-page/public/template/maintenance-page-display.php:1

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Maintenance Page screenshot), #2 (General Settings Page), #3 (Social Settings Page), #4 (Subscribe Settings Page)
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

maintenance-page/maintenance-page.php 92% from 13 tests

The main PHP script in "Maintenance Page" version 1.0.8 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 408 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin4,170 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS420752,347
PHP7179433998
SVG100520
JavaScript365141305

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity17.50
▷ Minimum class complexity5.00
▷ Maximum class complexity44.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods55
▷ Static methods35.45%
▷ Public methods5192.73%
▷ Protected methods00.00%
▷ Private methods47.27%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/admin/images/maintenance-page-pro.png74.64KB23.19KB▼ 68.93%