77% disable-email-notification-for-auto-updates

Code Review | Disable email Notification for auto-updates

WordPress plugin Disable email Notification for auto-updates scored 77% from 54 tests.

About plugin

  • Plugin page: disable-email-not...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 5.8.1
  • First release: Aug 17, 2021
  • Latest release: Aug 17, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ideastocode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 171 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: ▲0.10MB] [CPU: ▼144.79ms] Passed 4 tests

An overview of server-side resources used by Disable email Notification for auto-updates
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1827.67 ▲5.02
Dashboard /wp-admin3.20 ▲0.1443.02 ▼6.89
Posts /wp-admin/edit.php3.25 ▲0.1442.73 ▲0.33
Add New Post /wp-admin/post-new.php5.50 ▲0.0686.49 ▼573.53
Media Library /wp-admin/upload.php3.08 ▲0.0734.71 ▲0.95

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 2 new options
New WordPress options
itc_disable_update_notifications_settings
ideastocode_module_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Disable email Notification for auto-updates
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲17115.96 ▲0.4310.55 ▲0.0347.25 ▲0.30
Dashboard /wp-admin2,998 ▲615.98 ▼0.01143.27 ▼2.22106.92 ▼6.24
Posts /wp-admin/edit.php2,766 ▲272.74 ▲0.0264.98 ▼2.9999.71 ▲6.12
Add New Post /wp-admin/post-new.php1,635 ▲2021.73 ▼0.27269.48 ▼7.15103.52 ▼6.98
Media Library /wp-admin/upload.php1,834 ▲275.06 ▲0.01148.92 ▼7.49114.84 ▼3.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 2 options in the database
    • itc_disable_update_notifications_settings
    • ideastocode_module_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/disable-email-notification-for-auto-updates/admin/partials/_about.php
    • > /wp-content/plugins/disable-email-notification-for-auto-updates/admin/partials/_other_plugins.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/disable-email-notification-for-auto-updates/admin/partials/admin-display.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function menu_page_url() in wp-content/plugins/disable-email-notification-for-auto-updates/admin/partials/admin-notice.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ITC_Disable_Update_Notifications_BaseController' not found in wp-content/plugins/disable-email-notification-for-auto-updates/includes/class-deactivator.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ITC_Disable_Update_Notifications_BaseController' not found in wp-content/plugins/disable-email-notification-for-auto-updates/includes/class-itc.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/disable-email-notification-for-auto-updates/admin/partials/_settings.php:2
    • > PHP Warning
      Use of undefined constant ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL - assumed 'ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/disable-email-notification-for-auto-updates/admin/partials/_other_plugins.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'ITC_Disable_Update_Notifications_BaseController' not found in wp-content/plugins/disable-email-notification-for-auto-updates/public/class-public.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ITC_Disable_Update_Notifications_BaseController' not found in wp-content/plugins/disable-email-notification-for-auto-updates/admin/class-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ITC_Disable_Update_Notifications_BaseController' not found in wp-content/plugins/disable-email-notification-for-auto-updates/includes/class-activator.php:2
    • > PHP Warning
      Use of undefined constant ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL - assumed 'ITC_DISABLE_UPDATE_NOTIFICATIONS_PLUGIN_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/disable-email-notification-for-auto-updates/admin/partials/_about.php on line 8

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

disable-email-notification-for-auto-updates/itc-disable-email-notification.php 77% from 13 tests

"Disable email Notification for auto-updates" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("disable-email-notification-for-auto-updates.php" instead of "itc-disable-email-notification.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin634 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1710545474
CSS1303142
JavaScript13018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.89
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods4285.71%
▷ Protected methods00.00%
▷ Private methods714.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/Enable-SVG-webP-and-ico.png19.62KB1.83KB▼ 90.67%
admin/img/ideasToCode.png27.76KB4.21KB▼ 84.83%