83% site-is-offline-plugin

Code Review | Site Offline or Coming Soon

WordPress plugin Site Offline or Coming Soon scored 83% from 54 tests.

About plugin

  • Plugin page: site-is-offline-p...
  • Plugin version: 1.6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 5.8.1
  • First release: Jul 11, 2011
  • Latest release: Jun 19, 2017
  • Number of updates: 43
  • Update frequency: every 50.7 days
  • Top authors: wpecommerce (58.14%)Muneeb (44.19%)

Code review

54 tests

User reviews

31 reviews

Install metrics

10,000+ active / 334,082 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Site Offline or Coming Soon
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0125.71 ▲1.82
Dashboard /wp-admin3.07 ▲0.0131.59 ▼5.10
Posts /wp-admin/edit.php3.13 ▲0.0230.42 ▼0.78
Add New Post /wp-admin/post-new.php5.44 ▼0.0070.84 ▼578.17
Media Library /wp-admin/upload.php3.02 ▲0.0122.64 ▼0.52
Site Offline Mode /wp-admin/options-general.php?page=site-is-offline-plugin/main.php2.9921.04

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: no files
Database: no new tables, 1 new option
New WordPress options
sp_siteoffline_options

Browser metrics Passed 4 tests

Site Offline or Coming Soon: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲7015.99 ▼0.038.81 ▲3.7276.13 ▲4.45
Dashboard /wp-admin2,934 ▲356.10 ▼0.05114.74 ▼17.05171.11 ▼0.48
Posts /wp-admin/edit.php2,745 ▲23.24 ▼0.0063.83 ▼1.32135.41 ▼4.18
Add New Post /wp-admin/post-new.php3,926 ▲11118.59 ▼0.69421.00 ▼19.33161.63 ▼5.10
Media Library /wp-admin/upload.php1,757 ▲85.53 ▲0.00145.72 ▼6.37186.63 ▼0.85
Site Offline Mode /wp-admin/options-general.php?page=site-is-offline-plugin/main.php1,1182.3857.18114.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • sp_siteoffline_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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/site-is-offline-plugin/site-offline-options.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/site-is-offline-plugin/main.php:92

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (Site offline Plugin settings)
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
Please take inspiration from this readme.txt

site-is-offline-plugin/main.php 85% from 13 tests

Analyzing the main PHP file in "Site Offline or Coming Soon" version 1.6.6
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("site-is-offline-plugin.php" instead of "main.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 191 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin182 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22214114
HTML15068

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin