74% jf3-maintenance-mode

Code Review | Maintenance Redirect

WordPress plugin Maintenance Redirect scored74%from 54 tests.

About plugin

  • Plugin page: jf3-maintenance-mode
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2010
  • Latest release: Apr 13, 2023
  • Number of updates: 59
  • Update frequency: every 79.4 days
  • Top authors: petervandoorn (71.19%)jfinch3 (30.51%)

Code review

54 tests

User reviews

22 reviews

Install metrics

10,000+ active /162,186 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼5.88ms] Passed 4 tests

A check of server-side resources used by Maintenance Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2137.80 ▼2.77
Dashboard /wp-admin3.51 ▲0.2044.85 ▼5.25
Posts /wp-admin/edit.php3.62 ▲0.2745.72 ▼6.13
Add New Post /wp-admin/post-new.php6.09 ▲0.2084.30 ▼9.38
Media Library /wp-admin/upload.php3.43 ▲0.2035.15 ▲1.95
Maintenance Redirect /wp-admin/options-general.php?page=JF3_Maint_Redirect3.4032.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: 2 new tables, 8 new options
New tables
wp_wpjf3_mr_access_keys
wp_wpjf3_mr_unrestricted_ips
New WordPress options
theysaidso_admin_options
db_upgraded
wpjf3_mr
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
wpjf3_maintenance_redirect_version
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Maintenance Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.33 ▲0.331.81 ▼0.2643.93 ▼1.80
Dashboard /wp-admin2,196 ▲195.53 ▼0.1181.89 ▼18.1836.27 ▼8.81
Posts /wp-admin/edit.php2,101 ▼22.02 ▲0.0335.58 ▼8.1530.34 ▼8.90
Add New Post /wp-admin/post-new.php1,538 ▲1018.30 ▼4.56624.33 ▼13.3578.51 ▲29.86
Media Library /wp-admin/upload.php1,398 ▲44.22 ▼0.07100.47 ▼3.1744.29 ▼0.43
Maintenance Redirect /wp-admin/options-general.php?page=JF3_Maint_Redirect1,2371.6926.5241.32

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
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_wpjf3_mr_access_keys
    • wp_wpjf3_mr_unrestricted_ips
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • theysaidso_admin_options
    • wpjf3_maintenance_redirect_version
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • wpjf3_mr

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/jf3-maintenance-mode/uninstall.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/jf3-maintenance-mode/wpjf3_maintenance_redirect.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
Please take inspiration from this readme.txt

jf3-maintenance-mode/wpjf3_maintenance_redirect.php 92% from 13 tests

Analyzing the main PHP file in "Maintenance Redirect" version 2.0
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("jf3-maintenance-mode.php" instead of "wpjf3_maintenance_redirect.php")

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
Good job! No executable or dangerous file extensions detected1,085 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21851681,085

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity109.00
▷ Minimum class complexity109.00
▷ Maximum class complexity109.00
Average method complexity5.15
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin