73% my-maintenance-mode

Code Review | My Maintenance Mode

WordPress plugin My Maintenance Mode scored73%from 54 tests.

About plugin

  • Plugin page: my-maintenance-mode
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 19, 2012
  • Latest release: Nov 19, 2012
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: TrueFalse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,975 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.92MB] [CPU: ▼32.80ms] Passed 4 tests

Server-side resources used by My Maintenance Mode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.42 ▼2.29
Dashboard /wp-admin3.02 ▼0.2824.96 ▼30.17
Posts /wp-admin/edit.php3.03 ▼0.3327.06 ▼24.17
Add New Post /wp-admin/post-new.php3.03 ▼2.8627.36 ▼67.45
Media Library /wp-admin/upload.php3.03 ▼0.2024.46 ▼9.40

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for My Maintenance Mode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.26 ▼0.141.62 ▼0.2341.91 ▲0.31
Dashboard /wp-admin2,198 ▲215.64 ▼0.0490.86 ▲4.8838.36 ▼3.17
Posts /wp-admin/edit.php2,100 ▲32.18 ▲0.1836.55 ▼3.9734.23 ▼3.40
Add New Post /wp-admin/post-new.php1,364 ▼16717.00 ▼6.49591.45 ▼38.7140.75 ▼9.15
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.00101.52 ▼6.4441.46 ▼3.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function add_settings_section was called with an argument that is deprecated since version 3.5.0! The "privacy" options group has been removed. Use another settings group.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/my-maintenance-mode/mmm.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (This administration page.), #2 (The maintenance mode.)
You can look at the official readme.txt

my-maintenance-mode/mmm.php 85% from 13 tests

The principal PHP file in "My Maintenance Mode" v. 1.0.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • 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 ("my-maintenance-mode.php" instead of "mmm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin69 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2102037
PO File191132

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.52KB14.08KB▼ 3.06%
screenshot-2.png17.95KB17.28KB▼ 3.75%