84% kredeum-nfts

Code Review | Kredeum NFTs, the easiest way to sell your NFTs directly on your WordPress site

WordPress plugin Kredeum NFTs, the easiest way to sell your NFTs directly on your WordPress site scored84%from 54 tests.

About plugin

  • Plugin page: kredeum-nfts
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 17, 2021
  • Latest release: May 4, 2023
  • Number of updates: 91
  • Update frequency: every 8.6 days
  • Top authors: alain (93.41%)yoannr35 (7.69%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /11,058 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼0.56ms] Passed 4 tests

An overview of server-side resources used by Kredeum NFTs, the easiest way to sell your NFTs directly on your WordPress site
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.26 ▲1.19
Dashboard /wp-admin3.55 ▲0.2550.95 ▲1.06
Posts /wp-admin/edit.php3.67 ▲0.3152.21 ▲5.46
Add New Post /wp-admin/post-new.php6.15 ▲0.2785.30 ▼2.03
Media Library /wp-admin/upload.php3.48 ▲0.2536.35 ▼2.46
My NFTs /wp-admin/admin.php?page=nfts3.4433.98
NFTs settings /wp-admin/admin.php?page=storage_settings3.4536.83

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

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

Browser metrics Passed 4 tests

Kredeum NFTs, the easiest way to sell your NFTs directly on your WordPress site: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.78 ▲0.441.88 ▲0.2645.44 ▲2.12
Dashboard /wp-admin2,220 ▲395.63 ▼0.0883.17 ▼18.3338.26 ▼1.31
Posts /wp-admin/edit.php2,128 ▲282.00 ▲0.0235.53 ▼2.5034.97 ▼2.08
Add New Post /wp-admin/post-new.php1,547 ▲2123.27 ▼0.30636.84 ▼53.3054.83 ▲4.88
Media Library /wp-admin/upload.php1,428 ▲2512.99 ▲8.81178.65 ▲72.1243.19 ▼1.41
My NFTs /wp-admin/admin.php?page=nfts7815.68118.2955.26
NFTs settings /wp-admin/admin.php?page=storage_settings7985.5959.1429.93

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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)
Everything seems fine, however this is by no means 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
Please fix the following
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function KredeumNFTs\\Storage\\add_filter() in wp-content/plugins/kredeum-nfts/public/post/bottom.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/kredeum-nfts/vendor/tcdent/php-restclient/test.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function KredeumNFTs\\Ajax\\add_action() in wp-content/plugins/kredeum-nfts/admin/ajax/ajax.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function KredeumNFTs\\Storage\\add_action() in wp-content/plugins/kredeum-nfts/admin/media/post.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function KredeumNFTs\\Storage\\add_action() in wp-content/plugins/kredeum-nfts/admin/media/upload.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function KredeumNFTs\\esc_html() in wp-content/plugins/kredeum-nfts/kredeum-nfts.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function KredeumNFTs\\Storage\\add_filter() in wp-content/plugins/kredeum-nfts/admin/media-list/column.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function KredeumNFTs\\add_action() in wp-content/plugins/kredeum-nfts/public/front/automarket.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function KredeumNFTs\\Storage\\add_filter() in wp-content/plugins/kredeum-nfts/admin/media-list/actions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function KredeumNFTs\\Menu\\add_action() in wp-content/plugins/kredeum-nfts/admin/nfts/index.php:10

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7 in kredeum-nfts/assets to your readme.txt
The official readme.txt might help

kredeum-nfts/kredeum-nfts.php Passed 13 tests

"Kredeum NFTs, the easiest way to sell your NFTs directly on your WordPress site" version 1.1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
59 characters long description:
Plugin to archive your medias to IPFS and mint them as NFTs

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 plugin7,355 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
SVG9005,042
PHP353917871,766
Markdown1650189
PO File25871163
JSON300101
JavaScript384254
CSS50340

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.39
Average class complexity19.75
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods82
▷ Static methods1923.17%
▷ Public methods7996.34%
▷ Protected methods00.00%
▷ Private methods33.66%
Functions39
▷ Named functions1641.03%
▷ Anonymous functions2358.97%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 compressed PNG files occupy 0.08MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/images/icon-optimism.png1.40KB1.39KB0.28%
lib/images/icon-matic.png0.85KB0.84KB▼ 0.69%
lib/images/icon-bsc.png1.68KB1.67KB▼ 0.64%
lib/images/icon-polygonzkevm.png2.67KB2.67KB0.00%
lib/images/icon-gnosis.png42.56KB42.18KB▼ 0.89%