84% woo-disable-email-notifications

Code Review | Disable Email Notifications for WooCommerce

WordPress plugin Disable Email Notifications for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-disable-email...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 21, 2017
  • Latest release: Dec 15, 2022
  • Number of updates: 10
  • Update frequency: every 200.9 days
  • Top authors: brightvesseldev (60%)niloybrightvessel (50%)

Code review

54 tests

User reviews

16 reviews

Install metrics

300+ active /3,887 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
Install script ran successfully

Server metrics [RAM: ▲1.18MB] [CPU: ▲12.29ms] Passed 4 tests

This is a short check of server-side resources used by Disable Email Notifications for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.66 ▲1.1946.22 ▲8.28
Dashboard /wp-admin4.54 ▲1.1958.90 ▲0.99
Posts /wp-admin/edit.php4.59 ▲1.2383.10 ▲37.24
Add New Post /wp-admin/post-new.php7.06 ▲1.17127.05 ▲27.34
Media Library /wp-admin/upload.php4.40 ▲1.1749.22 ▲12.55
Codestar Framework /wp-admin/tools.php?page=csf-welcome4.4244.61
Disable Notifications /wp-admin/admin.php?page=woo-disable-email-notifications4.4051.81

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 140 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
woo-disable-email-notifications
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Disable Email Notifications for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.35 ▼0.863.87 ▲2.0538.06 ▲0.90
Dashboard /wp-admin2,243 ▲515.87 ▲0.9395.89 ▼15.4174.89 ▲34.38
Posts /wp-admin/edit.php2,125 ▲362.00 ▲0.0142.14 ▲7.2748.16 ▲13.63
Add New Post /wp-admin/post-new.php1,559 ▲4518.47 ▲1.03703.58 ▲80.4163.66 ▲8.89
Media Library /wp-admin/upload.php1,425 ▲404.24 ▲0.03104.25 ▲4.2374.14 ▲28.49
Codestar Framework /wp-admin/tools.php?page=csf-welcome1,4403.6347.1298.02
Disable Notifications /wp-admin/admin.php?page=woo-disable-email-notifications1,2283.5258.4981.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-disable-email-notifications/includes/core.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-disable-email-notifications/includes/core.php:7

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: You can look at the official readme.txt

woo-disable-email-notifications/main.php 92% from 13 tests

The main PHP script in "Disable Email Notifications for WooCommerce" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-disable-email-notifications.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin16,427 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP842,3151,4059,813
PO File203,0373,4146,180
CSS3632402
JSON20028
JavaScript2222
SVG2002

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.62
Average class complexity20.32
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity5.95
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes60
▷ Abstract classes23.33%
▷ Concrete classes5896.67%
▷ Final classes00.00%
Methods235
▷ Static methods5021.28%
▷ Public methods23399.15%
▷ Protected methods00.00%
▷ Private methods20.85%
Functions25
▷ Named functions2496.00%
▷ Anonymous functions14.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/bp-logo-icon.png1.63KB1.63KB0.24%
assets/img/004.png0.31KB0.25KB▼ 21.74%
includes/codestar/assets/images/checkerboard.png2.29KB2.54KB0.00%