84% greeting-by-day-time

Code Review | Say hello

WordPress plugin Say hello scored 84% from 54 tests.

About plugin

  • Plugin page: greeting-by-day-time
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2022
  • Latest release: Feb 25, 2023
  • Number of updates: 7
  • Update frequency: every 48.1 days
  • Top authors: haghs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 532 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.93ms] Passed 4 tests

An overview of server-side resources used by Say hello
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0135.79 ▼6.70
Dashboard /wp-admin3.31 ▲0.0044.90 ▼3.07
Posts /wp-admin/edit.php3.36 ▲0.0045.00 ▼3.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.95 ▼6.22
Media Library /wp-admin/upload.php3.23 ▲0.0034.72 ▲2.75

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Say hello: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.53 ▼0.771.77 ▼0.0841.01 ▼3.17
Dashboard /wp-admin2,206 ▲155.84 ▲0.9596.97 ▼8.5440.79 ▼0.10
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0440.98 ▲0.6035.15 ▼1.32
Add New Post /wp-admin/post-new.php1,514 ▼2817.69 ▼5.54629.01 ▼61.2145.86 ▼17.57
Media Library /wp-admin/upload.php1,382 ▼64.28 ▲0.0495.51 ▼18.9041.01 ▼5.97

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/greeting-by-day-time/SayHello.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: greet your website visitors by time of day

greeting-by-day-time/SayHello.php 92% from 13 tests

The main PHP file in "Say hello" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("greeting-by-day-time.php" instead of "SayHello.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected188 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14111188

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.72
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin