84% easynostr-nip05

Code Review | easyNostr-Nip05

WordPress plugin easyNostr-Nip05 scored84%from 54 tests.

About plugin

  • Plugin page: easynostr-nip05
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2023
  • Latest release: Jun 1, 2023
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mjeftovic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /89 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.42ms] Passed 4 tests

This is a short check of server-side resources used by easyNostr-Nip05
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.45 ▼0.73
Dashboard /wp-admin3.33 ▲0.0246.53 ▼5.37
Posts /wp-admin/edit.php3.38 ▲0.0248.42 ▼2.64
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.44 ▼0.92
Media Library /wp-admin/upload.php3.25 ▲0.0235.94 ▲0.63

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Illegal file modification found: 2 files (1.26KB) outside of "wp-content/plugins/easynostr-nip05/" and "wp-content/uploads/"
    • (new file) wp-admin/varwwwwordpress/.well-known/.htaccess
    • (new file) wp-admin/varwwwwordpress/.well-known/nostr.json
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for easyNostr-Nip05
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.33 ▼1.231.77 ▼0.3642.63 ▼3.15
Dashboard /wp-admin2,219 ▲315.83 ▼0.0597.97 ▼5.9239.97 ▼3.56
Posts /wp-admin/edit.php2,105 ▲132.04 ▼0.0139.11 ▼2.6635.03 ▼0.64
Add New Post /wp-admin/post-new.php1,527 ▲1317.52 ▼0.16627.62 ▼117.5448.03 ▼2.59
Media Library /wp-admin/upload.php1,398 ▲104.20 ▲0.0196.92 ▼3.1940.10 ▼2.34

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/easynostr-nip05/settings.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easynostr-nip05/nostr.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easynostr-nip05/addfields.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: nostr, easynostr, nip05, nip-05

easynostr-nip05/nostr.php 92% from 13 tests

The primary PHP file in "easyNostr-Nip05" version 1.0.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easynostr-nip05.php" instead of "nostr.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected167 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33755130
JSON14037

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin