84% wen-maintenance-mode

Code Review | WEN Maintenance Mode

WordPress plugin WEN Maintenance Mode scored84%from 54 tests.

About plugin

  • Plugin page: wen-maintenance-mode
  • Plugin version: 1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 10, 2019
  • Latest release: Apr 4, 2023
  • Number of updates: 18
  • Update frequency: every 85.8 days
  • Top authors: webexpertsnepal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,443 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.20ms] Passed 4 tests

Server-side resources used by WEN Maintenance Mode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.14 ▲2.34
Dashboard /wp-admin3.35 ▲0.0547.06 ▲0.87
Posts /wp-admin/edit.php3.40 ▲0.0547.40 ▲3.21
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.20 ▼13.10
Media Library /wp-admin/upload.php3.28 ▲0.0535.71 ▲1.09
WEN Maintenance Mode /wp-admin/options-general.php?page=wen-maintenance-mode3.3137.43

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WEN Maintenance Mode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.74 ▲0.341.75 ▲0.0744.37 ▲8.21
Dashboard /wp-admin2,213 ▲254.86 ▼0.02112.89 ▲12.9446.51 ▲4.76
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0435.91 ▼2.0133.58 ▲0.39
Add New Post /wp-admin/post-new.php1,517 ▼217.72 ▼5.49662.62 ▼20.0665.87 ▲12.95
Media Library /wp-admin/upload.php1,392 ▲74.19 ▲0.0299.35 ▼0.2340.57 ▲0.27
WEN Maintenance Mode /wp-admin/options-general.php?page=wen-maintenance-mode1,2793.9173.8358.68

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • 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 | This is a short smoke test looking 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
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wen-maintenance-mode/inc/views/index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wen-maintenance-mode/inc/views/tab-social.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wen-maintenance-mode/inc/views/tab-content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wen-maintenance-mode/inc/views/tab-general.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wen-maintenance-mode/inc/views/tab-misc.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: maintenance, landing page, maintenance page, coming soon page, maintenance mode

wen-maintenance-mode/wen-maintenance-mode.php Passed 13 tests

"WEN Maintenance Mode" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
41 characters long description:
Simple plugin for adding maintenance mode

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
Good job! No executable or dangerous file extensions detected1,092 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP74531571
CSS2124145428
JavaScript110374
SVG10019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity6.33
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/default-logo.png8.36KB4.06KB▼ 51.40%