10% mintnft

Code Review | MintNFT Plugin

WordPress plugin MintNFT Plugin scored 10% from 54 tests.

About plugin

  • Plugin page: mintnft
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 14, 2022
  • Latest release: Jun 27, 2023
  • Number of updates: 71
  • Update frequency: every 4.0 days
  • Top authors: techforceglobal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 930 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▼0.70MB] [CPU: ▼32.95ms] Passed 4 tests

An overview of server-side resources used by MintNFT Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2646.59 ▲5.71
Dashboard /wp-admin3.24 ▼0.0622.78 ▼23.90
Posts /wp-admin/edit.php3.24 ▼0.1229.55 ▼16.63
Add New Post /wp-admin/post-new.php3.24 ▼2.6523.83 ▼84.57
Media Library /wp-admin/upload.php3.24 ▲0.0125.08 ▼6.69
Meta Generation /wp-admin/admin.php?page=meta-generation3.2424.93
Contract Deployment /wp-admin/admin.php?page=contractdeployment3.2422.74
Mint NFT /wp-admin/admin.php?page=mintnft3.2424.01
Activation /wp-admin/admin.php?page=activation3.2424.63

Server storage [IO: ▲6.38MB] [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: 74 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
MintNFT_option_name
theysaidso_admin_options

Browser metrics Passed 4 tests

MintNFT Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,035 ▲27821.22 ▲6.842.11 ▲0.1140.33 ▼5.77
Dashboard /wp-admin2,402 ▲21412.12 ▲7.24335.46 ▲230.1859.87 ▲17.24
Posts /wp-admin/edit.php2,333 ▲2448.70 ▲6.73115.01 ▲76.2349.31 ▲15.60
Add New Post /wp-admin/post-new.php1,730 ▲21624.77 ▲7.26719.16 ▲45.9642.07 ▼12.10
Media Library /wp-admin/upload.php1,466 ▲789.64 ▲5.52141.90 ▲26.6662.18 ▲12.46
Meta Generation /wp-admin/admin.php?page=meta-generation1,15519.86471.8045.57
Contract Deployment /wp-admin/admin.php?page=contractdeployment8427.5470.2018.87
Mint NFT /wp-admin/admin.php?page=mintnft1,3248.7997.6090.82
Activation /wp-admin/admin.php?page=activation1,4639.00106.2597.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=activation
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mintnft/setup/plugin_abi.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/mintnft/templates/minting_page.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mintnft/meta_generation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mintnft/contract_deployment.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mintnft/activation.php:1

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 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (2. Get activation key.)
  • Screenshots: Please describe screenshot #2 in mintnft/assets to your readme.txt
You can look at the official readme.txt

mintnft/MintNFT.php 85% from 13 tests

The entry point to "MintNFT Plugin" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mintnft.php" instead of "MintNFT.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
No dangerous file extensions were detected24,944 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
CSS114,7279811,698
JSON2004,634
PHP78042733,297
SVG5012,788
JavaScript157084181,999
PO File5140155528

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.63MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/us.png2.23KB1.14KB▼ 48.91%
setup/logo.png3.21KB3.08KB▼ 4.02%
assets/img/icon.png3.23KB0.50KB▼ 84.35%
assets/img/india.png1.51KB0.73KB▼ 51.62%
(invalid) setup/nft-bg.png634.31KB0.00KB▼ 100.00%