10% knowledge-graph

Code Review | Knowledge graph

WordPress plugin Knowledge graph scored10%from 54 tests.

About plugin

  • Plugin page: knowledge-graph
  • Plugin version: 5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 12, 2016
  • Latest release: Aug 16, 2021
  • Number of updates: 27
  • Update frequency: every 72.3 days
  • Top authors: Ankush4475 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,344 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/knowledge-graph/index.php+62
    Undefined variable: sql

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.83ms] Passed 4 tests

Server-side resources used by Knowledge graph
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.35 ▼3.36
Dashboard /wp-admin3.34 ▼0.0051.97 ▼22.96
Posts /wp-admin/edit.php3.40 ▲0.0452.87 ▲3.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0499.88 ▼7.65
Media Library /wp-admin/upload.php3.27 ▲0.0437.77 ▼1.35
Knowledge Graph /wp-admin/tools.php?page=knowledgegraph3.2429.77

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

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

Browser metrics Passed 4 tests

Knowledge graph: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.66 ▲0.301.81 ▼0.4242.18 ▼1.80
Dashboard /wp-admin2,201 ▲215.49 ▼0.2784.42 ▼11.6139.92 ▲0.53
Posts /wp-admin/edit.php2,106 ▲61.97 ▼0.0639.89 ▲2.7137.72 ▲0.95
Add New Post /wp-admin/post-new.php1,533 ▲722.94 ▼0.17641.76 ▼42.7554.68 ▲2.91
Media Library /wp-admin/upload.php1,406 ▲124.21 ▼0.0397.34 ▼2.3244.66 ▲0.55
Knowledge Graph /wp-admin/tools.php?page=knowledgegraph1,6902.3629.4951.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_knowledgegraph
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 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
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 register_activation_hook() in wp-content/plugins/knowledge-graph/index.php:64

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% 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 to be fixed:
  • Tags: No tags were detected
The official readme.txt might help

knowledge-graph/index.php 92% from 13 tests

The principal PHP file in "Knowledge graph" v. 5.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("knowledge-graph.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin324 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12723270
CSS111154

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin