84% nostr-verify

Code Review | Nostr Verify

WordPress plugin Nostr Verify scored 84% from 54 tests.

About plugin

  • Plugin page: nostr-verify
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3
  • WordPress version: 6.3.1
  • First release: May 31, 2023
  • Latest release: Sep 5, 2023
  • Number of updates: 4
  • Update frequency: every 24.5 days
  • Top authors: jeherve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 323 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.13ms] Passed 4 tests

Analyzing server-side resources used by Nostr Verify
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.26 ▼2.96
Dashboard /wp-admin3.36 ▲0.0544.35 ▼8.84
Posts /wp-admin/edit.php3.41 ▲0.0550.34 ▲0.53
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.69 ▼5.24
Media Library /wp-admin/upload.php3.28 ▲0.0536.27 ▲1.48

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Nostr Verify
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.091.75 ▲0.0241.86 ▼4.33
Dashboard /wp-admin2,203 ▲184.84 ▼0.17121.66 ▲2.3639.60 ▼9.64
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0140.40 ▲4.8634.48 ▼2.10
Add New Post /wp-admin/post-new.php1,533 ▼023.38 ▼0.15651.93 ▲2.8760.27 ▲8.02
Media Library /wp-admin/upload.php1,388 ▼34.22 ▼0.0096.46 ▼0.1041.95 ▼1.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Jeherve\ostrVerify\\add_action() in wp-content/plugins/nostr-verify/nostr-verify.php:25

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: nostr, discovery, well-known, jrd

nostr-verify/nostr-verify.php Passed 13 tests

The principal PHP file in "Nostr Verify" v. 1.2.0 is loaded by WordPress automatically on each request
40 characters long description:
Verify yourself with Nostr, using NIP-05

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin213 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12669164
JSON10049

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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
Namespaces1
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%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin