84% quick-maintenance-mode-page

Code Review | Quick Maintenance Mode

WordPress plugin Quick Maintenance Mode scored84%from 54 tests.

About plugin

  • Plugin page: quick-maintenance...
  • Plugin version: 0.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.4
  • WordPress version: 6.3.1
  • First release: May 5, 2020
  • Latest release: May 5, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: yaroslawww (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.58ms] Passed 4 tests

A check of server-side resources used by Quick Maintenance Mode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0544.08 ▼1.52
Dashboard /wp-admin3.36 ▲0.0145.95 ▼21.72
Posts /wp-admin/edit.php3.47 ▲0.1147.30 ▲2.29
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.47 ▼1.38
Media Library /wp-admin/upload.php3.28 ▲0.0538.52 ▲5.30

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Quick Maintenance Mode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.081.81 ▼0.1742.05 ▼1.38
Dashboard /wp-admin2,206 ▲154.84 ▼0.03109.65 ▼1.0541.30 ▼1.89
Posts /wp-admin/edit.php2,092 ▲32.17 ▲0.1838.76 ▼0.4635.08 ▼1.54
Add New Post /wp-admin/post-new.php1,533 ▲1923.46 ▲5.75650.19 ▲35.0962.72 ▲12.51
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.04108.85 ▲10.0145.08 ▲2.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MaintenancePage\\Front\\add_action() in wp-content/plugins/quick-maintenance-mode-page/src/Front/Front.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/quick-maintenance-mode-page/views/pages/maintenance.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: maintenance mode

quick-maintenance-mode-page/bootstrap.php 92% from 13 tests

Analyzing the main PHP file in "Quick Maintenance Mode" version 0.0.1
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("quick-maintenance-mode-page.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected475 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1196162458
JSON20017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity11.80
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods32
▷ Static methods618.75%
▷ Public methods2887.50%
▷ Protected methods00.00%
▷ Private methods412.50%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin