84% maintenance-mode-with-timer

Code Review | Maintenance Mode with Timer

WordPress plugin Maintenance Mode with Timer scored84%from 54 tests.

About plugin

  • Plugin page: maintenance-mode-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 6.3.1
  • First release: Jan 10, 2017
  • Latest release: Feb 14, 2022
  • Number of updates: 22
  • Update frequency: every 84.4 days
  • Top authors: anoopranawat (72.73%)wponlinesupport (31.82%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /6,408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.42ms] Passed 4 tests

A check of server-side resources used by Maintenance Mode with Timer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.14 ▼3.22
Dashboard /wp-admin3.39 ▲0.0452.92 ▼11.28
Posts /wp-admin/edit.php3.50 ▲0.1453.53 ▲6.88
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.31 ▼3.61
Media Library /wp-admin/upload.php3.31 ▲0.0836.66 ▲4.45
How It Works /wp-admin/admin.php?page=mtm-how-it-work3.2832.38
Maintenance Mode - WPOS /wp-admin/admin.php?page=mtm-settings3.3739.75

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
mtm_plugin_version
widget_recent-comments
widget_theysaidso_widget
mtm_options

Browser metrics Passed 4 tests

Maintenance Mode with Timer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲8113.50 ▼0.901.70 ▼0.2241.67 ▼2.96
Dashboard /wp-admin2,233 ▲485.89 ▲0.10106.98 ▲3.3540.42 ▼2.77
Posts /wp-admin/edit.php2,116 ▲272.02 ▲0.0340.55 ▲6.6934.48 ▼2.33
Add New Post /wp-admin/post-new.php1,559 ▲4518.63 ▲0.96605.47 ▼59.9550.08 ▼10.50
Media Library /wp-admin/upload.php1,412 ▲244.21 ▲0.0598.42 ▼2.0843.18 ▲1.78
How It Works /wp-admin/admin.php?page=mtm-how-it-work9662.1524.0825.05
Maintenance Mode - WPOS /wp-admin/admin.php?page=mtm-settings1,9627.05138.3794.97

Uninstaller [IO: ▲0.00MB] [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
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • mtm_plugin_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • mtm_options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/maintenance-mode-with-timer/maintenance-mode-by-wpos.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

maintenance-mode-with-timer/maintenance-mode-by-wpos.php 92% from 13 tests

"Maintenance Mode with Timer" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("maintenance-mode-with-timer.php" instead of "maintenance-mode-by-wpos.php")

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
No dangerous file extensions were detected3,317 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42633191,936
PHP10144240693
CSS46773667
SVG19021

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.50
▷ Minimum class complexity4.00
▷ Maximum class complexity21.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
assets/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
assets/images/overlay.png0.91KB0.10KB▼ 89.15%
assets/images/sample-logo.png8.28KB3.94KB▼ 52.36%