10% navayan-subscribe

Code Review | Navayan Subscribe

WordPress plugin Navayan Subscribe scored10%from 54 tests.

About plugin

  • Plugin page: navayan-subscribe
  • Plugin version: 1.13
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 29, 2012
  • Latest release: Apr 22, 2013
  • Number of updates: 87
  • Update frequency: every 4.8 days
  • Top authors: amolnw2778 (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

200+ active /43,948 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/navayan-subscribe/functions.php+292
    Declaration of nys_SubscribeWidget::widget($args) should be compatible with WP_Widget::widget($args, $instance)

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.74ms] Passed 4 tests

An overview of server-side resources used by Navayan Subscribe
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.78 ▼39.27
Dashboard /wp-admin2.05 ▼1.265.11 ▼42.57
Posts /wp-admin/edit.php2.05 ▼1.316.33 ▼39.84
Add New Post /wp-admin/post-new.php2.05 ▼3.845.64 ▼93.29
Media Library /wp-admin/upload.php2.05 ▼1.185.02 ▼27.49
Navayan Subscribe /wp-admin/tools.php?page=navayan-subscribe2.055.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 55 new options
New WordPress options
ny_subscribe_spam_ip_list_remote
nyEmailSubscribeSubject
ny_unsubscribe_msg_before_submit
ny_subscribe_field_unable_to_subscribe
nyEmailUnSubscribeSubject
ny_subscribe_name_field_text
nyEmailSubject
ny_subscribe_optin_label
ny_unsubscribe_msg_email_not_exist
nyEmailFrom
...

Browser metrics Passed 4 tests

Checking browser requirements for Navayan Subscribe
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼1.464.89 ▲2.9442.71 ▲0.11
Dashboard /wp-admin2,213 ▲284.88 ▼1.02102.05 ▲0.2338.94 ▼3.57
Posts /wp-admin/edit.php2,101 ▲92.02 ▼0.0136.58 ▼3.9032.37 ▼1.71
Add New Post /wp-admin/post-new.php1,517 ▼1617.60 ▼5.54674.35 ▲74.1554.39 ▼1.06
Media Library /wp-admin/upload.php1,395 ▲134.14 ▼0.0696.77 ▼2.7043.25 ▼1.42
Navayan Subscribe /wp-admin/tools.php?page=navayan-subscribe1,5282.0925.4143.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/navayan-subscribe/functions.php+292
    Declaration of nys_SubscribeWidget::widget($args) should be compatible with WP_Widget::widget($args, $instance)
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_2

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=navayan-subscribe
    • > Warning in wp-content/plugins/navayan-subscribe/functions.php+292
    Declaration of nys_SubscribeWidget::widget($args) should be compatible with WP_Widget::widget($args, $instance)
    • > GET request to /wp-admin/tools.php?page=navayan-subscribe
    • > Warning in wp-content/plugins/navayan-subscribe/functions.php+287
    Declaration of nys_SubscribeWidget::form() should be compatible with WP_Widget::form($instance)
    • > GET request to /wp-admin/tools.php?page=navayan-subscribe
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in nys_SubscribeWidget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/navayan-subscribe/index.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/navayan-subscribe/functions.php:22

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)
No browser errors were detected

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 75% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tested up to: Version format is invalid
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Plugin listed under 'Dashboard -> Tools' tab), #2 (Send notification checkbox in 'Publish' metabox), #3 (Subscribe form in sidebar widget), #4 (UnSubscribe form), #5 (Subscribe and UnSubscribe form and messages settings), #6 (Custom Email Templates), #7 (Spam block list IPs/Domains/Emails), #8 (Subscribe confirmation email), #9 (Post/page notification email to subscribers)
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

navayan-subscribe/index.php 85% from 13 tests

The principal PHP file in "Navayan Subscribe" v. 1.13 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("navayan-subscribe.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 187 characters long)

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 plugin1,384 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP31421391,230
CSS13191
JavaScript16063

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants35
▷ Global constants35100.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin