84% knowledge-tags-from-yext

Code Review | Knowledge Tags from Yext Plugin

WordPress plugin Knowledge Tags from Yext Plugin scored84%from 54 tests.

About plugin

  • Plugin page: knowledge-tags-fr...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.0
  • WordPress version: 6.3.1
  • First release: Sep 15, 2017
  • Latest release: Jun 9, 2022
  • Number of updates: 11
  • Update frequency: every 159.0 days
  • Top authors: thundersnow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,157 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.26ms] Passed 4 tests

Analyzing server-side resources used by Knowledge Tags from Yext Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.66 ▼6.21
Dashboard /wp-admin3.36 ▲0.0255.62 ▼12.32
Posts /wp-admin/edit.php3.41 ▲0.0653.67 ▲1.12
Add New Post /wp-admin/post-new.php5.94 ▲0.0688.41 ▼15.63
Media Library /wp-admin/upload.php3.29 ▲0.0641.64 ▲1.97

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Knowledge Tags from Yext Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.69 ▼0.621.70 ▼0.1743.20 ▲0.25
Dashboard /wp-admin2,226 ▲355.79 ▼0.13102.62 ▼4.4485.26 ▲42.37
Posts /wp-admin/edit.php2,106 ▲141.97 ▼0.0641.74 ▲0.9034.21 ▼4.72
Add New Post /wp-admin/post-new.php1,534 ▲623.11 ▲4.56690.83 ▲63.7556.65 ▲5.36
Media Library /wp-admin/upload.php1,399 ▲114.16 ▼0.04109.08 ▲6.6774.97 ▲28.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knowledge-tags-from-yext/settings.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/knowledge-tags-from-yext/settings.php:75

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: content, knowledge tags from yext, yext, schema, schemaorg...

knowledge-tags-from-yext/yext-schema.php 92% from 13 tests

The principal PHP file in "Knowledge Tags from Yext Plugin" v. 1.0.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("knowledge-tags-from-yext.php" instead of "yext-schema.php")

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 detected342 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33968318
CSS14024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/yext-wp-icon-dark.png14.85KB0.42KB▼ 97.16%
public/images/yext-wp-icon-light.png14.85KB0.42KB▼ 97.16%