68% maintenance-mode-redirect

Code Review | Maintenance Mode Redirect

WordPress plugin Maintenance Mode Redirect scored 68% from 54 tests.

About plugin

  • Plugin page: maintenance-mode-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2023
  • Latest release: Jul 21, 2023
  • Number of updates: 4
  • Update frequency: every 23.3 days
  • Top authors: siriusproio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 111 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.24MB] [CPU: ▼43.20ms] Passed 4 tests

Server-side resources used by Maintenance Mode Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7313.63 ▼27.68
Dashboard /wp-admin2.77 ▼0.5416.03 ▼33.88
Posts /wp-admin/edit.php2.77 ▼0.5918.09 ▼29.43
Add New Post /wp-admin/post-new.php2.77 ▼3.1217.70 ▼81.81
Media Library /wp-admin/upload.php2.77 ▼0.4614.94 ▼20.49
Maintenance Mode Redirect /wp-admin/options-general.php?page=maintenance_mode_options2.7716.96

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Maintenance Mode Redirect: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.50 ▼0.871.51 ▼0.1740.10 ▼0.17
Dashboard /wp-admin2,213 ▲255.86 ▲0.9994.68 ▼7.1938.62 ▼6.66
Posts /wp-admin/edit.php2,093 ▲12.01 ▲0.0140.80 ▼4.0535.92 ▼1.40
Add New Post /wp-admin/post-new.php1,548 ▲2618.35 ▼4.74586.51 ▼79.9453.52 ▲2.75
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0293.15 ▼5.6640.83 ▼6.31
Maintenance Mode Redirect /wp-admin/options-general.php?page=maintenance_mode_options9232.0324.9724.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/maintenance-mode-redirect/maintenance-mode-redirect.php+31
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=maintenance_mode_options
    • > Notice in wp-content/plugins/maintenance-mode-redirect/maintenance-mode-redirect.php+113
    Trying to access array offset on value of type bool

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/maintenance-mode-redirect/maintenance-mode-redirect.php:142

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: under construction, admin, maintenance, technical break, redirect...

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

This is the main PHP file of "Maintenance Mode Redirect" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
111 characters long description:
Redirect and display a maintenance message to visitors and logs out non-admin users during maintenance periods.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected104 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11924104

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions11
▷ Named functions11100.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
There are no PNG files in this plugin