93% super-simple-site-offline-beta

Code Review | Super Simple Site Offline

WordPress plugin Super Simple Site Offline scored 93% from 54 tests.

About plugin

  • Plugin page: super-simple-site...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 5.9.2
  • First release: Oct 20, 2019
  • Latest release: Aug 8, 2021
  • Number of updates: 38
  • Update frequency: every 17.3 days
  • Top authors: betacore (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

5,000+ active / 35,054 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼289.38ms] Passed 4 tests

This is a short check of server-side resources used by Super Simple Site Offline
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1354.47 ▲6.86
Dashboard /wp-admin3.53 ▲0.1335.60 ▲3.42
Posts /wp-admin/edit.php3.76 ▲0.1240.50 ▲1.42
Add New Post /wp-admin/post-new.php6.99 ▲0.0297.02 ▼1,162.58
Media Library /wp-admin/upload.php3.40 ▲0.1123.52 ▲0.23
Offline /wp-admin/options-general.php?page=bcSOFF_offline_settings3.4128.16

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 1 new option
New WordPress options
bcSOFF_share_data

Browser metrics Passed 4 tests

An overview of browser requirements for Super Simple Site Offline
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,995 ▲24117.29 ▲1.695.97 ▼0.032.36 ▼0.37
Dashboard /wp-admin3,092 ▲2318.02 ▲1.89139.23 ▲8.17154.61 ▼7.07
Posts /wp-admin/edit.php2,920 ▲2325.06 ▲1.8278.03 ▲12.49138.53 ▼13.38
Add New Post /wp-admin/post-new.php1,712 ▲5117.44 ▲1.39395.97 ▼4.49184.10 ▲35.14
Media Library /wp-admin/upload.php1,705 ▲75.33 ▼0.15109.45 ▼32.68191.40 ▼4.58
Offline /wp-admin/options-general.php?page=bcSOFF_offline_settings1,4584.1968.21146.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/super-simple-site-offline-beta/template/wp-admin-design.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-simple-site-offline-beta/functions/admin.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/super-simple-site-offline-beta/classes/post.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/super-simple-site-offline-beta/template/wp-admin-premium.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/super-simple-site-offline-beta/template/wp-admin-form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/super-simple-site-offline-beta/template/wp-admin-form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/super-simple-site-offline-beta/classes/post.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/super-simple-site-offline-beta/template/wp-offline-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/super-simple-site-offline-beta/template/wp-admin-stats.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/super-simple-site-offline-beta/template/wp-admin-access.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Requires php: Invalid plugin version format
The official readme.txt might help

super-simple-site-offline-beta/simple-site-offline.php 69% from 13 tests

The primary PHP file in "Super Simple Site Offline" version 2.0.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("super-simple-site-offline-beta.php" instead of "simple-site-offline.php")
  • Description: The description should be shorter than 140 characters (currently 274 characters long)
  • Domain Path: The domain path folder was not found ("/lang")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,343 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP16248109721
CSS611911622

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.80
▷ Minimum class complexity5.00
▷ Maximum class complexity10.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods16
▷ Static methods1275.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 1.48MB with 1.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png172.93KB48.87KB▼ 71.74%
screenshot-2.png238.81KB57.06KB▼ 76.10%
screenshot-4.png1,009.23KB308.89KB▼ 69.39%
screenshot-3.png94.11KB25.69KB▼ 72.71%