84% user-wise-email-disable

Code Review | User Wise Email Disable

WordPress plugin User Wise Email Disable scored 84% from 54 tests.

About plugin

  • Plugin page: user-wise-email-d...
  • Plugin version: 0.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 22, 2022
  • Latest release: May 1, 2023
  • Number of updates: 4
  • Update frequency: every 48.0 days
  • Top authors: divyeshsapariya35 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 178 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.03MB] [CPU: ▼1.41ms] Passed 4 tests

Server-side resources used by User Wise Email Disable
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.02 ▲2.07
Dashboard /wp-admin3.33 ▲0.0347.22 ▼4.77
Posts /wp-admin/edit.php3.38 ▲0.0352.33 ▲2.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.46 ▼5.27
Media Library /wp-admin/upload.php3.26 ▲0.0335.37 ▲3.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by User Wise Email Disable
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5513.57 ▼0.711.75 ▼0.6448.25 ▼3.72
Dashboard /wp-admin2,218 ▲275.83 ▼0.0797.38 ▼8.0140.35 ▼3.22
Posts /wp-admin/edit.php2,101 ▲91.99 ▼0.0338.67 ▼4.3835.36 ▼0.62
Add New Post /wp-admin/post-new.php1,529 ▲1523.33 ▲5.77658.44 ▼23.9754.53 ▲0.00
Media Library /wp-admin/upload.php1,403 ▲184.30 ▲0.0996.99 ▼7.5342.93 ▼2.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/user-wise-email-disable/user-wise-email-disable.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-wise-email-disable/includes/uwed.class-init.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/user-wise-email-disable/templates/uwed-users-lists.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: disable user wise email, mail, disable email, switch off user wise mail, user email disable...

user-wise-email-disable/user-wise-email-disable.php 85% from 13 tests

The main PHP file in "User Wise Email Disable" ver. 0.1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("6.0.0" instead of "6.0")

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 plugin355 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP53915194
CSS113093
PO File1111144
JavaScript13024

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG images were found in this plugin