72% site-mode

Code Review | Maintenance, Coming Soon & Under Construction Page Builder

WordPress plugin Maintenance, Coming Soon & Under Construction Page Builder scored72%from 54 tests.

About plugin

  • Plugin page: site-mode
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Mar 4, 2023
  • Latest release: Nov 30, 2023
  • Number of updates: 12
  • Update frequency: every 22.6 days
  • Top authors: mobeen-abdullah (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼1.31ms] Passed 4 tests

Analyzing server-side resources used by Maintenance, Coming Soon & Under Construction Page Builder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4547.20 ▲6.29
Dashboard /wp-admin3.74 ▲0.3954.32 ▼8.66
Posts /wp-admin/edit.php3.79 ▲0.4356.47 ▲6.33
Add New Post /wp-admin/post-new.php6.26 ▲0.3790.31 ▼9.19
Media Library /wp-admin/upload.php3.58 ▲0.3441.00 ▲6.46
Templates /wp-admin/admin.php?page=site-mode&setting=templates3.6746.22
Settings /wp-admin/admin.php?page=site-mode&setting=settings3.6750.67
About Us /wp-admin/admin.php?page=site-mode&setting=about-us3.6742.00
Site Mode /wp-admin/admin.php?page=site-mode3.6739.49

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 172 new files
Database: no new tables, 10 new options
New WordPress options
site_mode_integrations
widget_theysaidso_widget
widget_recent-posts
site_mode_general
theysaidso_admin_options
db_upgraded
site_mode_advanced
can_compress_scripts
site_mode_seo
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Maintenance, Coming Soon & Under Construction Page Builder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,237 ▲48621.41 ▲7.21181.87 ▲180.01107.16 ▲62.95
Dashboard /wp-admin2,364 ▲1846.50 ▲0.81118.14 ▲17.9393.06 ▲48.00
Posts /wp-admin/edit.php2,310 ▲2073.61 ▲1.6055.39 ▲14.0569.97 ▲35.27
Add New Post /wp-admin/post-new.php6,239 ▲4,70919.05 ▼4.08916.23 ▲284.5139.44 ▼25.29
Media Library /wp-admin/upload.php1,450 ▲504.39 ▲0.2084.68 ▼10.0781.01 ▲40.98
Templates /wp-admin/admin.php?page=site-mode&setting=templates2,33210.25257.6555.51
Settings /wp-admin/admin.php?page=site-mode&setting=settings2,33210.24286.0853.18
About Us /wp-admin/admin.php?page=site-mode&setting=about-us2,33210.47151.9036.47
Site Mode /wp-admin/admin.php?page=site-mode2,3319.62136.2666.23

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 were found after uninstall: 7 options
    • widget_recent-posts
    • site_mode_integrations
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/site-mode/admin/partials/wizard/sidebar.php
    • > /wp-content/plugins/site-mode/public/partials/site-mode-public-display.php
    • > /wp-content/plugins/site-mode/admin/partials/about-page.php
  • 29× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(SITE_MODE_ADMINclasses/class-settings.php): failed to open stream: No such file or directory in wp-content/plugins/site-mode/admin/classes/class-site-mode-integrations.php on line 22
    • > PHP Fatal error
      require(): Failed opening required 'SITE_MODE_ADMINpartials/wizard/header.php' (include_path='.:/usr/share/php') in wp-content/plugins/site-mode/admin/partials/wizard/wizard.php on line 75
    • > PHP Fatal error
      require_once(): Failed opening required 'SITE_MODE_BLOCKSsite-mode-countdown/site-mode-countdown.php' (include_path='.:/usr/share/php') in wp-content/plugins/site-mode/blocks/init.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/site-mode/admin/partials/wizard/import-template.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Settings' not found in wp-content/plugins/site-mode/admin/classes/class-site-mode-design.php:22
    • > PHP Warning
      Use of undefined constant SITE_MODE_ADMIN - assumed 'SITE_MODE_ADMIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/site-mode/admin/partials/wizard/wizard.php on line 75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/site-mode/admin/partials/seo-setting-page.php:25
    • > PHP Warning
      Use of undefined constant SITE_MODE_ADMIN - assumed 'SITE_MODE_ADMIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/site-mode/admin/classes/class-site-mode-advanced.php on line 22
    • > PHP Fatal error
      require_once(): Failed opening required 'SITE_MODE_ADMINclasses/class-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/site-mode/admin/classes/class-site-mode-advanced.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/site-mode/admin/partials/main-content.php:31

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=site-mode
    • > Network (severe)
    https://demo.site-mode.com/?site-mode-preview=true - Failed to load resource: the server responded with a status of 503 ()
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=site-mode
    • > Network (severe)
    https://demo.site-mode.com/wp-json/wp/v2/users/me?context=edit&_locale=user - Failed to load resource: the server responded with a status of 401 ()
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=site-mode
    • > Javascript (severe) in unknown
    https://demo.site-mode.com/?site-mode-preview=true 0:0 Uncaught Object: You are not currently logged in.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === site-mode === )
  • Screenshots: These screenshots lack descriptions #11, #12, #13 in site-mode/assets to your readme.txt
The official readme.txt might help

site-mode/site-mode.php Passed 13 tests

"Maintenance, Coming Soon & Under Construction Page Builder" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
82 characters long description:
Create a beautiful Maintenance, Coming Soon or Under Construction Page in Seconds.

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
Everything looks great! No dangerous files found in this plugin14,611 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
Sass453181544,923
CSS87181514,521
PHP424691,6993,378
JavaScript91781521,475
JSON2250284
Markdown121030

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.19
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods87
▷ Static methods22.30%
▷ Public methods7990.80%
▷ Protected methods33.45%
▷ Private methods55.75%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/sitemode-logo.png19.26KB10.24KB▼ 46.82%
admin/assets/img/admin-menu-icon.png0.54KB0.37KB▼ 32.19%