78% maintenance-mode-page-editor

Code Review | Plugin Name: Maintenance mode page generator

WordPress plugin Plugin Name: Maintenance mode page generator scored78%from 54 tests.

About plugin

  • Plugin page: maintenance-mode-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 7, 2017
  • Latest release: Feb 18, 2021
  • Number of updates: 14
  • Update frequency: every 102.6 days
  • Top authors: xxxborland (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /498 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.93ms] Passed 4 tests

This is a short check of server-side resources used by Plugin Name: Maintenance mode page generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.01 ▼2.00
Dashboard /wp-admin3.33 ▼0.0155.42 ▼3.23
Posts /wp-admin/edit.php3.45 ▲0.0953.22 ▲2.50
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.65 ▼16.72
Media Library /wp-admin/upload.php3.24 ▲0.0135.64 ▲2.23
Maintenance settings /wp-admin/options-general.php?page=maintenance-settings3.2733.54

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
mmpg_options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: Maintenance mode page generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲19914.78 ▲0.431.69 ▼0.1238.31 ▼1.72
Dashboard /wp-admin2,348 ▲1636.46 ▲0.58129.78 ▲5.8752.38 ▲9.24
Posts /wp-admin/edit.php2,271 ▲1793.40 ▲1.3756.79 ▲16.5247.43 ▲11.45
Add New Post /wp-admin/post-new.php1,521 ▲223.53 ▲0.23646.26 ▼19.2252.54 ▼4.41
Media Library /wp-admin/upload.php1,407 ▲194.19 ▲0.0084.41 ▼21.5154.34 ▲6.10
Maintenance settings /wp-admin/options-general.php?page=maintenance-settings1,7136.72144.58118.03

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=maintenance-settings
    • > Notice in wp-content/plugins/maintenance-mode-page-editor/core/view/back/options.php+8
    Undefined variable: style
    • > GET request to /wp-admin/options-general.php?page=maintenance-settings
    • > Notice in wp-content/plugins/maintenance-mode-page-editor/core/view/back/options.php+49
    Undefined variable: logo
    • > GET request to /wp-admin/options-general.php?page=maintenance-settings
    • > Notice in wp-content/plugins/maintenance-mode-page-editor/core/view/back/options.php+118
    Undefined variable: css
    • > GET request to /wp-admin/options-general.php?page=maintenance-settings
    • > Notice in wp-content/plugins/maintenance-mode-page-editor/core/view/back/options.php+127
    Undefined variable: js

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: description in wp-content/plugins/maintenance-mode-page-editor/core/view/back/options.php on line 62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/maintenance-mode-page-editor/core/view/front/maintenance.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maintenance-mode-page-editor/core/controller/mmpga_admin.class.php:10
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/maintenance-mode-page-editor/core/view/back/options.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maintenance-mode-page-editor/core/controller/mmpga_admin.class.php:10
    • > PHP Notice
      Undefined variable: logo in wp-content/plugins/maintenance-mode-page-editor/core/view/back/options.php on line 49
    • > PHP Fatal error
      Uncaught Error: Class 'mmpga_controller' not found in wp-content/plugins/maintenance-mode-page-editor/core/controller/mmpga_frontend.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'mmpga_controller' not found in wp-content/plugins/maintenance-mode-page-editor/core/controller/mmpga_admin.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_editor() in wp-content/plugins/maintenance-mode-page-editor/core/view/back/options.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === Plugin Name: Maintenance mode page generator === )
  • Contributors: The plugin contributors field is missing
You can look at the official readme.txt

maintenance-mode-page-editor/maintenance-mode-page-generator.php 92% from 13 tests

Analyzing the main PHP file in "Plugin Name: Maintenance mode page generator" version 1.1
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 ("maintenance-mode-page-editor.php" instead of "maintenance-mode-page-generator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,315 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
LESS73621514
CSS1021478
PHP97221307
JavaScript10016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.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

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/facebook.png5.57KB3.52KB▼ 36.74%
assets/img/twitter.png13.24KB8.15KB▼ 38.44%
assets/img/instagram.png9.17KB9.14KB0.36%