90% nft-gallery

Code Review | NFT Gallery

WordPress plugin NFT Gallery scored90%from 54 tests.

About plugin

  • Plugin page: nft-gallery
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2022
  • Latest release: May 18, 2023
  • Number of updates: 13
  • Update frequency: every 35.5 days
  • Top authors: hendcorp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /3,412 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by NFT Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.29 ▼3.50
Dashboard /wp-admin3.36 ▲0.0543.24 ▼9.65
Posts /wp-admin/edit.php3.41 ▲0.0548.50 ▲2.62
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.24 ▼3.22
Media Library /wp-admin/upload.php3.28 ▲0.0536.00 ▲0.29

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for NFT Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.28 ▼1.121.88 ▼0.0742.46 ▼11.39
Dashboard /wp-admin2,218 ▲304.96 ▲0.04104.13 ▼9.6837.89 ▼9.67
Posts /wp-admin/edit.php2,101 ▲122.04 ▲0.0140.43 ▲4.4935.76 ▼0.11
Add New Post /wp-admin/post-new.php1,543 ▲2923.30 ▲5.60677.32 ▲36.5349.83 ▼2.29
Media Library /wp-admin/upload.php1,400 ▲154.21 ▼0.0199.68 ▲1.2945.59 ▲0.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
3 plugin tags: nft, gallery, opensea

nft-gallery/nftgallery.php 92% from 13 tests

The primary PHP file in "NFT Gallery" version 1.2.0 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 ("nft-gallery.php" instead of "nftgallery.php")

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
There were no executable files found in this plugin325 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP33935196
CSS214389
JavaScript24040

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin