10% mm-maintenance-redirect-to-page

Code Review | MM Maintenance redirect to page

WordPress plugin MM Maintenance redirect to page scored10%from 54 tests.

About plugin

  • Plugin page: mm-maintenance-re...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Mar 17, 2016
  • Latest release: Apr 26, 2016
  • Number of updates: 8
  • Update frequency: every 11.0 days
  • Top authors: flegfleg (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /2,649 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Parse error in wp-content/plugins/mm-maintenance-redirect-to-page/index.php+154
    syntax error, unexpected end of file

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

Analyzing server-side resources used by MM Maintenance redirect to page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.82 ▼2.65
Dashboard /wp-admin3.31 ▲0.0050.13 ▼8.43
Posts /wp-admin/edit.php3.36 ▲0.0050.49 ▼2.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.71 ▼1.70
Media Library /wp-admin/upload.php3.23 ▲0.0039.93 ▲4.43

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for MM Maintenance redirect to page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.111.71 ▼0.2344.83 ▼0.55
Dashboard /wp-admin2,195 ▲155.60 ▼0.0193.61 ▲3.1341.62 ▼3.37
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0239.42 ▲0.9134.27 ▼5.05
Add New Post /wp-admin/post-new.php1,526 ▼023.62 ▲0.35660.50 ▼16.1150.64 ▼6.41
Media Library /wp-admin/upload.php1,394 ▼34.20 ▼0.07101.61 ▼2.3945.46 ▼0.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/mm-maintenance-redirect-to-page/index.php on line 154

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 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Plugin Settings Screen)
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

mm-maintenance-redirect-to-page/index.php 77% from 13 tests

The main file in "MM Maintenance redirect to page" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("mm-maintenance-redirect-to-page.php" instead of "index.php")
  • Domain Path: The domain path folder was not found ("/languages")

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
Everything looks great! No dangerous files found in this plugin107 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1443179
PO File13323
Markdown1405

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.10
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screenshot.PNG30.54KB7.77KB▼ 74.57%
screenshot-1.png30.54KB7.77KB▼ 74.57%