84% custom-welcome-messages

Code Review | Custom Welcome Messages

WordPress plugin Custom Welcome Messages scored84%from 54 tests.

About plugin

  • Plugin page: custom-welcome-me...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.3.1
  • WordPress version: 6.3.1
  • First release: Jan 9, 2012
  • Latest release: Jan 9, 2012
  • Number of updates: 7
  • Update frequency: every 4.7 days
  • Top authors: josh401 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /6,211 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.24ms] Passed 4 tests

Analyzing server-side resources used by Custom Welcome Messages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.65 ▼0.85
Dashboard /wp-admin3.39 ▲0.0844.75 ▼1.34
Posts /wp-admin/edit.php3.50 ▲0.1449.27 ▲4.36
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.43 ▼5.05
Media Library /wp-admin/upload.php3.31 ▲0.0833.31 ▼1.70
Custom Welcome Messages /wp-admin/options-general.php?page=custom-welcome3.2834.98

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Welcome Messages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▼0.121.62 ▼0.0541.50 ▲0.58
Dashboard /wp-admin2,201 ▲215.58 ▼0.0781.98 ▼2.0635.39 ▼8.12
Posts /wp-admin/edit.php2,106 ▲92.02 ▲0.0338.82 ▲3.0635.94 ▲2.50
Add New Post /wp-admin/post-new.php1,542 ▲1618.31 ▼5.12597.12 ▼51.4265.92 ▲0.30
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0396.96 ▼2.9941.82 ▼1.85
Custom Welcome Messages /wp-admin/options-general.php?page=custom-welcome1,0762.0127.0038.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-welcome-messages/main.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Shows a custom login/register screen.), #2 (Shows a custom logout screen.), #3 (Shows admin settings page for custom login/register screen.), #4 (Shows admin settings page for custom logout screen.), #5 (Shows admin page for extra settings.)
The official readme.txt might help

custom-welcome-messages/main.php 92% from 13 tests

The main PHP file in "Custom Welcome Messages" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-welcome-messages.php" instead of "main.php")

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
No dangerous file extensions were detected335 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16465256
CSS113279

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.23MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/rss.png4.17KB1.39KB▼ 66.77%
screenshot-5.png13.71KB7.38KB▼ 46.21%
screenshot-4.png18.81KB10.32KB▼ 45.11%
img/support.png4.63KB1.55KB▼ 66.43%
screenshot-1.png113.68KB45.44KB▼ 60.03%