83% maintenance-mode-z

Code Review | Maintenance mode Z

WordPress plugin Maintenance mode Z scored83%from 54 tests.

About plugin

  • Plugin page: maintenance-mode-z
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Oct 25, 2012
  • Latest release: Nov 11, 2012
  • Number of updates: 13
  • Update frequency: every 1.3 days
  • Top authors: zelenin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /4,439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲2.03ms] Passed 4 tests

Server-side resources used by Maintenance mode Z
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.52 ▼2.58
Dashboard /wp-admin3.44 ▲0.1348.75 ▼4.49
Posts /wp-admin/edit.php3.49 ▲0.1351.52 ▲11.25
Add New Post /wp-admin/post-new.php6.02 ▲0.13100.45 ▲6.36
Media Library /wp-admin/upload.php3.36 ▲0.1341.22 ▲8.83
Maintenance mode Z /wp-admin/options-general.php?page=mmode3.4043.62

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 74 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Maintenance mode Z
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲22114.84 ▲0.465.63 ▲3.4843.31 ▼3.13
Dashboard /wp-admin2,274 ▲866.27 ▲0.46120.92 ▲4.5144.55 ▼2.89
Posts /wp-admin/edit.php2,176 ▲872.86 ▲0.8546.61 ▲7.5633.95 ▲0.72
Add New Post /wp-admin/post-new.php1,277 ▼25615.51 ▼7.66485.81 ▼138.9921.33 ▼43.20
Media Library /wp-admin/upload.php1,472 ▲905.45 ▲1.26114.38 ▲14.5142.69 ▲0.63
Maintenance mode Z /wp-admin/options-general.php?page=mmode2,0137.53150.72134.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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
The following issues need your attention
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/maintenance-mode-z/templates/template-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/maintenance-mode-z/mmode.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/maintenance-mode-z/templates/slider.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/maintenance-mode-z/templates/template-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/maintenance-mode-z/templates/template-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/maintenance-mode-z/templates/template-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/maintenance-mode-z/templates/template-functions.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === maintenance-mode-z === )
You can look at the official readme.txt

maintenance-mode-z/mmode.php 92% from 13 tests

Analyzing the main PHP file in "Maintenance mode Z" version 1.1.0
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("maintenance-mode-z.php" instead of "mmode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,812 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript332302621,858
PHP7110151,062
CSS9113160892

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
24 PNG files occupy 0.49MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/images/404.png88.56KB47.10KB▼ 46.81%
image.png4.22KB0.78KB▼ 81.40%
css/images/ui-icons_0073ea_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_flat_0_eeeeee_40x100.png0.18KB0.08KB▼ 51.67%
templates/slider/btn_controls.png0.71KB0.44KB▼ 37.77%