84% lj-maintenance-mode

Code Review | Maintenance Mode

WordPress plugin Maintenance Mode scored84%from 54 tests.

About plugin

  • Plugin page: lj-maintenance-mode
  • Plugin version: 2.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8
  • WordPress version: 6.3.1
  • First release: Nov 27, 2014
  • Latest release: Jul 15, 2021
  • Number of updates: 88
  • Update frequency: every 27.5 days
  • Top authors: LukasNeptun (100%)

Code review

54 tests

User reviews

62 reviews

Install metrics

30,000+ active /515,021 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
This plugin's installer ran successfully

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

A check of server-side resources used by Maintenance Mode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1243.36 ▲7.53
Dashboard /wp-admin3.43 ▲0.1351.20 ▲3.08
Posts /wp-admin/edit.php3.54 ▲0.1851.50 ▲3.43
Add New Post /wp-admin/post-new.php6.01 ▲0.1385.67 ▼2.32
Media Library /wp-admin/upload.php3.35 ▲0.1339.72 ▲5.06
Maintenance Mode /wp-admin/options-general.php?page=lj-maintenance-mode3.3846.42

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
ljmm-mode
can_compress_scripts
ljmm-content
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Maintenance Mode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.36 ▼0.111.70 ▼0.0745.76 ▲3.49
Dashboard /wp-admin2,215 ▲345.62 ▼0.0895.28 ▲0.4840.86 ▼2.90
Posts /wp-admin/edit.php2,120 ▲201.99 ▼0.0140.06 ▲3.5537.45 ▲5.50
Add New Post /wp-admin/post-new.php1,535 ▼1623.14 ▲4.90655.77 ▲5.0455.14 ▼22.93
Media Library /wp-admin/upload.php1,414 ▲144.25 ▲0.08103.35 ▲6.7146.09 ▲2.15
Maintenance Mode /wp-admin/options-general.php?page=lj-maintenance-mode1,7206.85132.0989.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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
Everything seems fine, however 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/lj-maintenance-mode/lj-maintenance-mode.php:35

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 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
7 plugin tags: website maintenance, site maintenance, maintenance mode, coming soon, under construction...

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

The main PHP file in "Maintenance Mode" ver. 2.4.4 adds more information about the plugin and also serves as the entry point for this plugin
108 characters long description:
Very simple Maintenance Mode & Coming soon page using default Wordpress markup with no ads or paid upgrades.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,163 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PO File8159190613
PHP299249545
XML1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected