84% schedule-maintenance-mode

Code Review | Schedule Maintenance Mode

WordPress plugin Schedule Maintenance Mode scored84%from 54 tests.

About plugin

  • Plugin page: schedule-maintena...
  • Plugin version: 1.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 8, 2018
  • Latest release: Jun 12, 2023
  • Number of updates: 22
  • Update frequency: every 79.1 days
  • Top authors: rajkakadiya (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /3,868 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
Installer ran successfully

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

A check of server-side resources used by Schedule Maintenance Mode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.89 ▼1.66
Dashboard /wp-admin3.34 ▼0.0147.78 ▼12.36
Posts /wp-admin/edit.php3.42 ▲0.0746.41 ▲1.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.32 ▼5.44
Media Library /wp-admin/upload.php3.24 ▲0.0140.26 ▲5.88
Schedule Maintenance Mode /wp-admin/options-general.php?page=smmgk-schedule-maintenance-mode3.3434.48

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Schedule Maintenance Mode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲20715.07 ▲0.701.77 ▼0.0438.77 ▼5.68
Dashboard /wp-admin2,362 ▲1746.68 ▲0.84132.56 ▲11.4839.22 ▼5.37
Posts /wp-admin/edit.php2,270 ▲1813.77 ▲1.7569.92 ▲35.6633.83 ▼1.57
Add New Post /wp-admin/post-new.php1,690 ▲17025.02 ▲2.07607.60 ▼68.1535.87 ▼36.37
Media Library /wp-admin/upload.php1,401 ▲134.44 ▲0.1994.55 ▼7.7240.91 ▼5.12
Schedule Maintenance Mode /wp-admin/options-general.php?page=smmgk-schedule-maintenance-mode1,2843.5751.2125.78

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

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function smmgk_get_options() in wp-content/plugins/schedule-maintenance-mode/theme/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function smmgk_get_options() in wp-content/plugins/schedule-maintenance-mode/admin/options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: The official readme.txt is a good inspiration

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

The entry point to "Schedule Maintenance Mode" version 1.9 is a PHP file that has certain tags in its header comment area
75 characters long description:
Enable Maintenance page for any specific interval time or specified by you.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,230 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript26528941,284
PHP45319506
CSS310622440

PHP code Passed 2 tests

An short overview of 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.41
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/default_maintenance_logo.png152.82KB35.95KB▼ 76.48%