84% maintenance

Code Review | Maintenance

WordPress plugin Maintenance scored84%from 54 tests.

About plugin

  • Plugin page: maintenance
  • Plugin version: 4.08
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 31, 2012
  • Latest release: Aug 31, 2023
  • Number of updates: 213
  • Update frequency: every 19.3 days
  • Top authors: fruitfulcode (70.89%)WebFactory (28.64%)wpreset (1.41%)

Code review

54 tests

User reviews

799 reviews

Install metrics

800,000+ active /9,852,796 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▼2.32ms] Passed 4 tests

An overview of server-side resources used by Maintenance
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4142.01 ▲1.06
Dashboard /wp-admin3.84 ▲0.5355.59 ▼1.11
Posts /wp-admin/edit.php3.89 ▲0.5354.62 ▲3.63
Add New Post /wp-admin/post-new.php6.38 ▲0.4989.99 ▼12.84
Media Library /wp-admin/upload.php3.70 ▲0.4746.19 ▲8.43

Server storage [IO: ▲3.74MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/maintenance/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 136 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
theysaidso_admin_options
mtnc_db_version
maintenance_meta
widget_recent-posts
maintenance_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Maintenance
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13513.73 ▼0.561.66 ▼0.2154.36 ▲9.37
Dashboard /wp-admin2,293 ▲905.19 ▲0.30104.34 ▼22.6278.08 ▲31.86
Posts /wp-admin/edit.php2,178 ▲752.33 ▲0.3346.70 ▲12.1142.17 ▲5.25
Add New Post /wp-admin/post-new.php1,721 ▲17622.24 ▼1.20716.34 ▲93.5230.77 ▼27.07
Media Library /wp-admin/upload.php1,503 ▲1034.47 ▲0.20114.87 ▲12.8679.65 ▲35.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maintenance/load/functions.php:164
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mtnc_get_custom_login_code() in wp-content/plugins/maintenance/load/index.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maintenance/maintenance.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maintenance/includes/update.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maintenance/includes/functions.php:337
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maintenance/includes/admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: bunny fonts, maintenance page, maintenance, coming soon, under construction page...

maintenance/maintenance.php 92% from 13 tests

The main PHP script in "Maintenance" version 4.08 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin17,986 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript702,5517209,882
SVG2033,638
PHP10395432,603
CSS8281241,862
JSON1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity18.50
▷ Minimum class complexity12.00
▷ Maximum class complexity25.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions78
▷ Named functions7697.44%
▷ Anonymous functions22.56%
Constants7
▷ Global constants7100.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
11 PNG files occupy 0.34MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wf-flyout/icons/301-logo.png6.33KB3.09KB▼ 51.22%
wf-flyout/icons/maintenance.png24.13KB8.04KB▼ 66.68%
images/maintenance-mascot.png161.93KB44.28KB▼ 72.66%
images/icon-small.png15.68KB0.76KB▼ 95.13%
images/wp-maintenance-logo.png23.53KB3.74KB▼ 84.09%