94% dl-maintenance-mode

Code Review | DL Maintenance Mode

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

About plugin

  • Plugin page: dl-maintenance-mode
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6
  • WordPress version: 5.8.1
  • First release: Feb 24, 2014
  • Latest release: Aug 26, 2016
  • Number of updates: 6
  • Update frequency: every 152.3 days
  • Top authors: dyadyalesha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,695 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼144.08ms] Passed 4 tests

A check of server-side resources used by DL Maintenance Mode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.85 ▲17.37
Dashboard /wp-admin3.06 ▲0.0152.26 ▲4.01
Posts /wp-admin/edit.php3.12 ▲0.0149.01 ▲10.28
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.76 ▼584.07
Media Library /wp-admin/upload.php3.01 ▲0.0131.79 ▼6.53

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

DL Maintenance Mode: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,699 ▲10315.81 ▲0.3011.80 ▲2.9448.52 ▼8.95
Dashboard /wp-admin2,993 ▲655.94 ▼0.21142.48 ▼8.39130.84 ▲16.14
Posts /wp-admin/edit.php2,759 ▲202.70 ▲0.0270.63 ▲2.6299.58 ▼1.06
Add New Post /wp-admin/post-new.php1,694 ▲1118.38 ▲0.10391.94 ▼8.88115.30 ▲0.34
Media Library /wp-admin/upload.php1,823 ▲15.04 ▲0.03165.23 ▲14.75136.19 ▲10.76

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 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dl-maintenance-mode/dl-maintenance-mode.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: maintenance mode, dl

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

The main PHP script in "DL Maintenance Mode" version 1.1 is automatically included on every request by WordPress
68 characters long description:
Включаем режим обслуживания на сайте

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected