93% nftconnect

Code Review | NFTConnect

WordPress plugin NFTConnect scored 93% from 54 tests.

About plugin

  • Plugin page: nftconnect
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 5.8.1
  • First release: Apr 5, 2021
  • Latest release: Apr 6, 2021
  • Number of updates: 4
  • Update frequency: every 3.0 days
  • Top authors: thenerdcat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 278 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼139.61ms] Passed 4 tests

Server-side resources used by NFTConnect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1342.22 ▲19.28
Dashboard /wp-admin3.07 ▲0.0147.20 ▼1.59
Posts /wp-admin/edit.php3.15 ▲0.0554.31 ▲4.99
Add New Post /wp-admin/post-new.php5.42 ▼0.0196.02 ▼561.40
Media Library /wp-admin/upload.php3.01 ▲0.0137.14 ▼0.42

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for NFTConnect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,824 ▲22816.33 ▲0.7824.76 ▲14.2655.18 ▲3.75
Dashboard /wp-admin2,977 ▲436.04 ▼0.14144.71 ▼32.56107.99 ▼21.82
Posts /wp-admin/edit.php2,746 ▲72.71 ▼0.0172.30 ▼5.1294.85 ▼3.41
Add New Post /wp-admin/post-new.php1,622 ▼6121.53 ▲3.23288.91 ▼115.89112.17 ▼15.74
Media Library /wp-admin/upload.php1,817 ▲105.01 ▼0.00166.69 ▲5.93115.86 ▼8.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/nftconnect/nftconnect-superrare-gallery.php
    • > /wp-content/plugins/nftconnect/admin/partials/nftconnect-superrare-gallery-admin-display.php
    • > /wp-content/plugins/nftconnect/public/partials/nftconnect-superrare-gallery-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === nftconnect === )
You can take inspiration from this readme.txt

nftconnect/nftconnect-superrare-gallery.php 85% from 13 tests

"NFTConnect" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nftconnect.php" instead of "nftconnect-superrare-gallery.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin557 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS238298
PHP12142545253
JavaScript24546

PHP code Passed 2 tests

This is a very shot 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.23
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin