67% the-welcomizer

Code Review | The Welcomizer

WordPress plugin The Welcomizer scored67%from 54 tests.

About plugin

  • Plugin page: the-welcomizer
  • Plugin version: 2.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.3
  • WordPress version: 6.3.1
  • First release: Jan 6, 2011
  • Latest release: Aug 19, 2015
  • Number of updates: 998
  • Update frequency: every 1.7 days
  • Top authors: sebwordpress (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /86,551 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.27MB] [CPU: ▼0.44ms] Passed 4 tests

Server-side resources used by The Welcomizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3246.05 ▲2.58
Dashboard /wp-admin3.61 ▲0.3144.23 ▼1.80
Posts /wp-admin/edit.php3.66 ▲0.3043.81 ▼5.91
Add New Post /wp-admin/post-new.php6.13 ▲0.2493.13 ▲3.36
Media Library /wp-admin/upload.php3.47 ▲0.2439.53 ▲8.08
The Welcomizer /wp-admin/themes.php?page=the-welcomizer3.4430.15

Server storage [IO: ▲2.69MB] [DB: ▲0.01MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/the-welcomizer/" and "wp-content/uploads/"
    • (new file) wp-content/twiz/export/backup/.empty
Filesystem: 176 new files
Database: 1 new table, 21 new options
New tables
wp_the_welcomizer
New WordPress options
twiz_toggle
twiz_hardsections
twiz_db_version
twiz_library
widget_recent-posts
widget_recent-comments
twiz_admin
db_upgraded
theysaidso_admin_options
twiz_global_status
...

Browser metrics Passed 4 tests

Checking browser requirements for The Welcomizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6714.77 ▲0.371.85 ▲0.0742.83 ▼0.30
Dashboard /wp-admin2,222 ▲314.89 ▲0.0198.65 ▼0.1138.43 ▼2.10
Posts /wp-admin/edit.php2,102 ▲131.98 ▼0.0639.97 ▲3.0533.98 ▲3.58
Add New Post /wp-admin/post-new.php1,544 ▲3023.60 ▲6.12653.18 ▲31.1646.84 ▼14.25
Media Library /wp-admin/upload.php1,398 ▲74.20 ▼0.0196.74 ▼4.4143.63 ▲2.17
The Welcomizer /wp-admin/themes.php?page=the-welcomizer8922.0421.6836.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/the-welcomizer/includes/twiz.installation.class.php+720
    Illegal string offset 'delete_all'
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/the-welcomizer/twiz-ajax.js.php
    • > /wp-content/plugins/the-welcomizer/includes/jquery/tinymce-shortcode/twiz-tinymce-shortcode.js.php
    • > /wp-content/plugins/the-welcomizer/includes/import/server/php.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twiz' not found in wp-content/plugins/the-welcomizer/includes/twiz.ajax.class.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twiz' not found in wp-content/plugins/the-welcomizer/includes/twiz.admin.class.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twiz' not found in wp-content/plugins/the-welcomizer/includes/twiz.library.class.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twiz' not found in wp-content/plugins/the-welcomizer/includes/twiz.admin.class.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twiz' not found in wp-content/plugins/the-welcomizer/includes/twiz.group.class.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twiz' not found in wp-content/plugins/the-welcomizer/includes/twiz.menu.class.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/the-welcomizer/twiz-index.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'Twiz' not found in wp-content/plugins/the-welcomizer/includes/twiz.menu.class.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twiz' not found in wp-content/plugins/the-welcomizer/includes/twiz.view.class.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Twiz' not found in wp-content/plugins/the-welcomizer/includes/twiz.output.class.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (65 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Panel when viewing data.), #2 (Panel when adding a new animation.)
Please take inspiration from this readme.txt

the-welcomizer/twiz-index.php 92% from 13 tests

The primary PHP file in "The Welcomizer" version 2.8.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("the-welcomizer.php" instead of "twiz-index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin23,372 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP174,86988313,748
CSS7316,187
JavaScript204581,0242,228
PO File26171,2121,081
Markdown1390113
SVG10015

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 169)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity142.62
▷ Minimum class complexity1.00
▷ Maximum class complexity621.00
Average method complexity10.56
▷ Minimum method complexity1.00
▷ Maximum method complexity169.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods237
▷ Static methods00.00%
▷ Public methods10243.04%
▷ Protected methods239.70%
▷ Private methods11247.26%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants383
▷ Global constants51.31%
▷ Class constants37898.69%
▷ Public constants378100.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
68 compressed PNG files occupy 1.23MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
skins/yellow/images/twiz-arrow-ne.png1.69KB1.48KB▼ 12.43%
skins/yellow/images/twiz-arrow-n.png1.47KB1.38KB▼ 6.56%
skins/_default/images/twiz-arrow-se.png1.89KB1.58KB▼ 16.31%
skins/red/images/twiz-arrow-sw.png1.83KB1.58KB▼ 13.40%
skins/blue/images/twiz-arrow-w.png1.52KB1.39KB▼ 8.47%