84% nodeinfo

Code Review | NodeInfo(2)

WordPress plugin NodeInfo(2) scored84%from 54 tests.

About plugin

  • Plugin page: nodeinfo
  • Plugin version: 2.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Nov 28, 2018
  • Latest release: Oct 16, 2023
  • Number of updates: 31
  • Update frequency: every 57.5 days
  • Top authors: pfefferle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /7,730 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.00ms] Passed 4 tests

Server-side resources used by NodeInfo(2)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.18 ▼5.98
Dashboard /wp-admin3.34 ▲0.0449.78 ▼7.31
Posts /wp-admin/edit.php3.39 ▲0.0350.25 ▼2.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.96 ▼10.84
Media Library /wp-admin/upload.php3.26 ▲0.0334.98 ▼3.88

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

NodeInfo(2): an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.112.06 ▲0.1552.74 ▲4.08
Dashboard /wp-admin2,195 ▲155.61 ▼0.0487.59 ▼13.9738.63 ▼12.41
Posts /wp-admin/edit.php2,100 ▼61.95 ▼0.1637.79 ▼7.0135.81 ▼2.25
Add New Post /wp-admin/post-new.php1,534 ▲818.12 ▼4.93634.21 ▲8.2272.49 ▲12.79
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.03100.70 ▼3.7241.99 ▼1.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nodeinfo/nodeinfo.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: nodeinfo, ostatus, activitypub, fediverse, diaspora

nodeinfo/nodeinfo.php Passed 13 tests

The principal PHP file in "NodeInfo(2)" v. 2.2.0 is loaded by WordPress automatically on each request
134 characters long description:
NodeInfo is an effort to create a standardized way of exposing metadata about a server running one of the distributed social networks.

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
There were no executable files found in this plugin366 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP56476366

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods526.32%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin