94% auto-maintenance-mode

Code Review | Auto Maintenance Mode

WordPress plugin Auto Maintenance Mode scored 94% from 54 tests.

About plugin

  • Plugin page: auto-maintenance-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Jul 30, 2016
  • Latest release: Jul 10, 2021
  • Number of updates: 24
  • Update frequency: every 75.3 days
  • Top authors: pothi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 858 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼138.23ms] Passed 4 tests

An overview of server-side resources used by Auto Maintenance Mode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0236.33 ▲1.06
Dashboard /wp-admin3.08 ▲0.0242.66 ▼1.55
Posts /wp-admin/edit.php3.13 ▲0.0242.50 ▼3.27
Add New Post /wp-admin/post-new.php5.43 ▲0.00102.93 ▼549.14
Media Library /wp-admin/upload.php3.02 ▲0.0234.89 ▲2.70

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Auto Maintenance Mode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.23 ▲0.689.07 ▼0.2650.53 ▼3.61
Dashboard /wp-admin2,973 ▲395.90 ▼0.17139.36 ▼4.45109.48 ▲0.25
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0066.61 ▲0.5793.35 ▲0.49
Add New Post /wp-admin/post-new.php1,672 ▼1118.77 ▲0.00367.60 ▼4.30110.40 ▼0.07
Media Library /wp-admin/upload.php1,810 ▲35.00 ▼0.01143.14 ▼14.66120.47 ▲7.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/auto-maintenance-mode/amm-template.php:2

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)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

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

The main PHP script in "Auto Maintenance Mode" version 1.1.0 is automatically included on every request by WordPress
110 characters long description:
A plugin to enable maintenance mode automatically upon lack of activity on development / staging / test sites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin100 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants5100.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
PNG images were not found in this plugin