72% wp-maintenance

Code Review | WP Maintenance

WordPress plugin WP Maintenance scored72%from 54 tests.

About plugin

  • Plugin page: wp-maintenance
  • Plugin version: 6.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 13, 2013
  • Latest release: Nov 20, 2023
  • Number of updates: 465
  • Update frequency: every 8.5 days
  • Top authors: Florent73 (100%)

Code review

54 tests

User reviews

87 reviews

Install metrics

40,000+ active /808,044 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.36MB] [CPU: ▼2.80ms] Passed 4 tests

A check of server-side resources used by WP Maintenance
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3643.59 ▲3.60
Dashboard /wp-admin3.68 ▲0.3453.46 ▼7.16
Posts /wp-admin/edit.php3.80 ▲0.4457.55 ▲3.85
Add New Post /wp-admin/post-new.php6.27 ▲0.3886.75 ▼11.49
Media Library /wp-admin/upload.php3.61 ▲0.3841.85 ▲7.88
Pictures /wp-admin/admin.php?page=wp-maintenance-picture3.7143.59
CountDown /wp-admin/admin.php?page=wp-maintenance-countdown3.6742.93
CSS Style /wp-admin/admin.php?page=wp-maintenance-css3.6340.45
General /wp-admin/admin.php?page=wp-maintenance3.6643.72
Social Networks /wp-admin/admin.php?page=wp-maintenance-socialnetworks3.6840.62
SEO /wp-admin/admin.php?page=wp-maintenance-seo3.6343.66
Colors & Fonts /wp-admin/admin.php?page=wp-maintenance-colors3.8541.17
Settings /wp-admin/admin.php?page=wp-maintenance-settings3.6740.76
Footer /wp-admin/admin.php?page=wp-maintenance-footer3.6640.96

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 1,020 new files
Database: no new tables, 18 new options
New WordPress options
wp_maintenance_settings_footer
wp_maintenance_settings_countdown
wp_maintenance_settings_socialnetworks
wp_maintenance_settings_seo
widget_theysaidso_widget
wp_maintenance_settings_picture
theysaidso_admin_options
wp_maintenance_settings_options
wp_maintenance_active
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by WP Maintenance
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12414.34 ▼0.371.61 ▼0.1542.04 ▼0.86
Dashboard /wp-admin2,276 ▲965.54 ▼0.0992.47 ▼0.7383.26 ▲36.25
Posts /wp-admin/edit.php2,199 ▲992.00 ▼0.0139.21 ▲0.1136.64 ▲0.21
Add New Post /wp-admin/post-new.php1,765 ▲22821.98 ▼1.50751.52 ▲48.0146.39 ▼8.91
Media Library /wp-admin/upload.php1,499 ▲964.14 ▼0.10109.16 ▲3.6873.00 ▲29.55
Pictures /wp-admin/admin.php?page=wp-maintenance-picture1,7825.1999.6751.04
CountDown /wp-admin/admin.php?page=wp-maintenance-countdown4,7848.98189.44169.20
CSS Style /wp-admin/admin.php?page=wp-maintenance-css2,3635.5783.85117.57
General /wp-admin/admin.php?page=wp-maintenance1,9107.83139.94121.40
Social Networks /wp-admin/admin.php?page=wp-maintenance-socialnetworks1,8575.1663.24112.30
SEO /wp-admin/admin.php?page=wp-maintenance-seo1,4634.8162.0988.66
Colors & Fonts /wp-admin/admin.php?page=wp-maintenance-colors5,1876.78142.50117.80
Settings /wp-admin/admin.php?page=wp-maintenance-settings1,8005.1165.9145.11
Footer /wp-admin/admin.php?page=wp-maintenance-footer1,8557.72134.8795.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 17 options in the database
    • wp_maintenance_version
    • widget_recent-posts
    • wp_maintenance_settings_socialnetworks
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wp_maintenance_settings
    • widget_recent-comments
    • wp_maintenance_settings_seo
    • wp_maintenance_list_socialnetworks
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 14× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-maintenance/includes/functions.php
    • > /wp-content/plugins/wp-maintenance/views/wp-maintenance-css.php
    • > /wp-content/plugins/wp-maintenance/includes/shortcodes.php
    • > /wp-content/plugins/wp-maintenance/views/wp-maintenance-seo.php
    • > /wp-content/plugins/wp-maintenance/themes/default/index2.php
    • > /wp-content/plugins/wp-maintenance/views/wp-maintenance-countdown.php
    • > /wp-content/plugins/wp-maintenance/views/wp-maintenance-dashboard.php
    • > /wp-content/plugins/wp-maintenance/themes/default/index.php
    • > /wp-content/plugins/wp-maintenance/views/wp-maintenance-picture.php
    • > /wp-content/plugins/wp-maintenance/views/wp-maintenance-socialnetworks.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_maintenance' not found in wp-content/plugins/wp-maintenance/classes/countdown.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=wp-maintenance-colors
    • > Network (severe)
    https://fonts.googleapis.com/css?family=Helvetica - Failed to load resource: the server responded with a status of 403 ()

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: maintenance, launch, coming soon, construction

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

The entry point to "WP Maintenance" version 6.1.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 175 characters long)

Code Analysis Passed 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 plugin6,212 lines of code in 156 files:
LanguageFilesBlank linesComment linesLines of code
PHP176832093,156
CSS19232181,119
JavaScript10697107828
LESS11274273572
PO File1304477518
Markdown29019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity68.00
▷ Minimum class complexity21.00
▷ Maximum class complexity115.00
Average method complexity5.79
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods517.86%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.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
855 PNG files occupy 4.18MB with 2.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
socialicons/style1/128/android.png2.89KB1.17KB▼ 59.44%
socialicons/style2/64/facebook.png1.31KB0.28KB▼ 78.91%
socialicons/style6/512/behance.png5.72KB6.48KB0.00%
socialicons/style3/32/wordpress.png1.62KB0.50KB▼ 69.02%
socialicons/style1/512/instagram.png10.81KB4.70KB▼ 56.50%