67% wp-simple-notify

Code Review | WP Simple Notify

WordPress plugin WP Simple Notify scored67%from 54 tests.

About plugin

  • Plugin page: wp-simple-notify
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2020
  • Latest release: Apr 16, 2020
  • Number of updates: 8
  • Update frequency: every 3.4 days
  • Top authors: christianbaltazar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /522 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.56MB] [CPU: ▼15.36ms] Passed 4 tests

Server-side resources used by WP Simple Notify
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1245.85 ▲4.06
Dashboard /wp-admin3.42 ▲0.1152.86 ▲3.28
Posts /wp-admin/edit.php3.53 ▲0.1744.15 ▼2.56
Add New Post /wp-admin/post-new.php3.29 ▼2.5936.77 ▼62.71
Media Library /wp-admin/upload.php3.34 ▲0.1137.10 ▲0.56
WP Simple Notify /wp-admin/options-general.php?page=wp-simple-notify-admin3.3131.19

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

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

Browser metrics Passed 4 tests

WP Simple Notify: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.28 ▼1.404.88 ▲3.0442.01 ▼8.03
Dashboard /wp-admin2,213 ▲224.87 ▼0.01111.19 ▲5.4238.76 ▼9.01
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0237.97 ▼0.4433.93 ▼1.26
Add New Post /wp-admin/post-new.php1,536 ▼623.29 ▲4.97677.08 ▼0.1750.64 ▼13.35
Media Library /wp-admin/upload.php1,395 ▲74.13 ▲0.01100.48 ▼16.1040.49 ▼7.11
WP Simple Notify /wp-admin/options-general.php?page=wp-simple-notify-admin1,2412.6849.4293.98

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp-simple-notify-admin
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-simple-notify/src/templates/main-settings.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHWPINC/class-phpmailer.php): failed to open stream: No such file or directory in wp-content/plugins/wp-simple-notify/src/Email.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-phpmailer.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-simple-notify/src/Email.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-simple-notify/src/templates/main-settings.php:133
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-simple-notify/wp-simple-notify.php:10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-simple-notify/src/Email.php on line 6
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-simple-notify/src/Email.php on line 6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=wp-simple-notify-admin
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-simple-notify//src/assets/font-awesome-4.7.0.min.css?ver=6.3.1 3:3 Uncaught SyntaxError: Invalid or unexpected token

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: comments, notifications, email

wp-simple-notify/wp-simple-notify.php Passed 13 tests

The main file in "WP Simple Notify" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
69 characters long description:
Very simple but efficient plugin to handle common email notifications

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
Success! There were no dangerous files found in this plugin10,241 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,1541,4989,441
PHP13178302768
Markdown113016
JSON20014
CSS2092

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.57
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods51
▷ Static methods59.80%
▷ Public methods4792.16%
▷ Protected methods00.00%
▷ Private methods47.84%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants11
▷ Global constants218.18%
▷ Class constants981.82%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected