84% knowledge-token

Code Review | Knowledge Token

WordPress plugin Knowledge Token scored 84% from 54 tests.

About plugin

  • Plugin page: knowledge-token
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jul 20, 2022
  • Latest release: Jul 27, 2022
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: knowledgetoken (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 261 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▲2.45ms] Passed 4 tests

Analyzing server-side resources used by Knowledge Token
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0047.15 ▲3.10
Dashboard /wp-admin3.31 ▲0.0055.87 ▼0.40
Posts /wp-admin/edit.php3.36 ▲0.0053.06 ▼0.54
Add New Post /wp-admin/post-new.php5.88 ▼0.00111.28 ▲12.47
Media Library /wp-admin/upload.php3.23 ▲0.0043.50 ▲7.63

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Knowledge Token
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲1414.48 ▼0.212.14 ▼0.0644.17 ▲1.50
Dashboard /wp-admin2,209 ▼04.91 ▲0.07106.47 ▼5.1842.43 ▲1.07
Posts /wp-admin/edit.php2,089 ▼02.15 ▲0.1140.20 ▲2.8037.60 ▲3.10
Add New Post /wp-admin/post-new.php1,648 ▲11122.48 ▼0.69718.93 ▲73.9566.86 ▲6.49
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.03109.18 ▲2.1945.12 ▼0.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knowledge-token/knowledge-token.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: token, nft, crypto, knowledge

knowledge-token/knowledge-token.php Passed 13 tests

"Knowledge Token" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
120 characters long description:
Add Knowledge Token NFT's to your content. This allows users to buy Knowledge NFT-s and therefore monetise your content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected190 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript120183
PHP1377

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin