88% multisite-maintenance-mode

Code Review | Multisite Maintenance Mode

WordPress plugin Multisite Maintenance Mode scored 88% from 54 tests.

About plugin

  • Plugin page: multisite-mainten...
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-4.2.2
  • WordPress version: 5.8.1
  • First release: Jul 25, 2013
  • Latest release: Jun 30, 2015
  • Number of updates: 9
  • Update frequency: every 78.4 days
  • Top authors: channeleaton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,553 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼142.50ms] Passed 4 tests

This is a short check of server-side resources used by Multisite Maintenance Mode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0237.98 ▲2.45
Dashboard /wp-admin3.08 ▲0.0347.17 ▼0.14
Posts /wp-admin/edit.php3.13 ▲0.0348.22 ▼0.05
Add New Post /wp-admin/post-new.php5.44 ▲0.0193.74 ▼572.25
Media Library /wp-admin/upload.php3.02 ▲0.0235.85 ▲2.70

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Multisite Maintenance Mode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.85 ▲0.298.79 ▲2.1147.64 ▼11.56
Dashboard /wp-admin2,973 ▲396.09 ▲0.05142.13 ▼4.46112.46 ▲3.80
Posts /wp-admin/edit.php2,739 ▼02.81 ▼0.0072.66 ▼0.3191.35 ▼3.47
Add New Post /wp-admin/post-new.php1,683 ▼018.78 ▲0.93388.41 ▲6.62113.82 ▼1.14
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.03153.86 ▼19.15122.95 ▼3.96

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/multisite-maintenance-mode/views/display.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/multisite-maintenance-mode/multisite-maintenance-mode.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multisite-maintenance-mode/views/admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (The MMM settings page.) image missing
Please take inspiration from this readme.txt

multisite-maintenance-mode/multisite-maintenance-mode.php Passed 13 tests

"Multisite Maintenance Mode" version 0.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
69 characters long description:
Disables logins for all WordPress users except network administrators

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 plugin235 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP55990126
CoffeeScript15056
PO File171327
JSON10017
Ruby1699

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png55.81KB18.50KB▼ 66.86%