78% site-setup-wizard

Code Review | Site Setup Wizard

WordPress plugin Site Setup Wizard scored78%from 54 tests.

About plugin

  • Plugin page: site-setup-wizard
  • Plugin version: 1.5.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jun 15, 2016
  • Latest release: Jul 12, 2017
  • Number of updates: 18
  • Update frequency: every 30.7 days
  • Top authors: shah.neel (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /4,088 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▲2.44ms] Passed 4 tests

An overview of server-side resources used by Site Setup Wizard
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2139.63 ▲0.75
Dashboard /wp-admin3.49 ▲0.1946.98 ▼2.05
Posts /wp-admin/edit.php3.60 ▲0.2554.05 ▲5.99
Add New Post /wp-admin/post-new.php6.09 ▲0.2196.22 ▲5.69
Media Library /wp-admin/upload.php3.41 ▲0.1937.70 ▲5.38

Server storage [IO: ▲2.40MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 55 new files
Database: 1 new table, 6 new options
New tables
wp_nsd_site_setup_wizard
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Site Setup Wizard: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲10813.14 ▼1.245.37 ▲3.7440.95 ▲2.04
Dashboard /wp-admin2,215 ▲234.87 ▼0.07109.71 ▲2.6740.46 ▼1.86
Posts /wp-admin/edit.php2,098 ▲92.04 ▲0.0140.03 ▼0.5837.33 ▲0.10
Add New Post /wp-admin/post-new.php1,523 ▼723.28 ▲0.01625.88 ▼58.8149.38 ▼12.60
Media Library /wp-admin/upload.php1,400 ▲124.23 ▲0.0699.70 ▼5.3042.49 ▼2.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/site-setup-wizard/admin/ssw_breadcrumb_text.php
    • > /wp-content/plugins/site-setup-wizard/admin/ssw_cancel_skip_button.php
  • 39× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant SSW_PLUGIN_DIR - assumed 'SSW_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/site-setup-wizard/wizard/step4.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/site-setup-wizard/admin/ssw_breadcrumb_text.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/site-setup-wizard/admin/ssw_breadcrumb_text.php on line 24
    • > PHP Warning
      include(SSW_PLUGIN_DIRadmin/ssw_cancel_skip_button.php): failed to open stream: No such file or directory in wp-content/plugins/site-setup-wizard/wizard/step2.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/site-setup-wizard/admin/create_new_site.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/site-setup-wizard/wizard/step4.php:12
    • > PHP Warning
      include(): Failed opening 'SSW_PLUGIN_DIRadmin/ssw_cancel_skip_button.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/site-setup-wizard/wizard/step3.php on line 9
    • > PHP Warning
      include(SSW_PLUGIN_DIRadmin/ssw_cancel_skip_button.php): failed to open stream: No such file or directory in wp-content/plugins/site-setup-wizard/wizard/step3.php on line 9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/site-setup-wizard/admin/ssw_save_options.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/site-setup-wizard/wizard/finish.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: multisite, site registration, site creation, create site, site setup wizard...

site-setup-wizard/site-setup-wizard.php 92% from 13 tests

The main file in "Site Setup Wizard" v. 1.5.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 263 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin24,036 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82,7601,63113,664
CSS9244908,217
PHP202554181,864
SVG100288
LESS1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity110.00
▷ Minimum class complexity110.00
▷ Maximum class complexity110.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon@5x.png1.52KB0.59KB▼ 61.23%
images/add_new_icon@5x.png1.52KB0.59KB▼ 61.23%
images/icon.png0.78KB0.52KB▼ 32.62%
images/add_new_icon.png0.78KB0.52KB▼ 32.62%