89% cron-job-mail-setup-for-user-role

Code Review | DGAshu Cron Job Mail Setup For User Role by DGAshu

WordPress plugin DGAshu Cron Job Mail Setup For User Role by DGAshu scored89%from 54 tests.

About plugin

  • Plugin page: cron-job-mail-set...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: May 12, 2022
  • Latest release: May 12, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: dgashu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /720 total downloads

Benchmarks

Plugin footprint 83% 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.05MB] [CPU: ▼0.65ms] Passed 4 tests

Server-side resources used by DGAshu Cron Job Mail Setup For User Role by DGAshu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0643.48 ▼3.86
Dashboard /wp-admin3.44 ▲0.1378.66 ▲32.30
Posts /wp-admin/edit.php3.41 ▲0.0552.88 ▲3.69
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.78 ▼2.84
Media Library /wp-admin/upload.php3.28 ▲0.0536.10 ▲0.40

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

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

Browser metrics Passed 4 tests

DGAshu Cron Job Mail Setup For User Role by DGAshu: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲4513.38 ▼0.941.71 ▼0.3143.60 ▲5.04
Dashboard /wp-admin2,222 ▲344.87 ▼0.03102.79 ▲2.7138.78 ▼2.63
Posts /wp-admin/edit.php2,105 ▲161.99 ▼0.0237.34 ▲3.7633.02 ▼1.02
Add New Post /wp-admin/post-new.php1,546 ▲3223.29 ▲5.78700.45 ▲22.6453.89 ▼3.07
Media Library /wp-admin/upload.php1,404 ▲164.23 ▲0.0795.74 ▲1.7240.14 ▼2.16

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_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Screenshots: These screenshots require images: #3 (Set Custom Subject to the user Role), #4 (Choose which user can get the mail)
The official readme.txt is a good inspiration

cron-job-mail-setup-for-user-role/DGAshu-Cron-Job-Mail-Setup-For-User-Role.php 92% from 13 tests

"DGAshu Cron Job Mail Setup For User Role by DGAshu" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cron-job-mail-setup-for-user-role.php" instead of "DGAshu-Cron-Job-Mail-Setup-For-User-Role.php")

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
There were no executable files found in this plugin94 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131694

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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