84% simple-keyword-to-link

Code Review | Simple Keyword to Link

WordPress plugin Simple Keyword to Link scored84%from 54 tests.

About plugin

  • Plugin page: simple-keyword-to...
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2023
  • Latest release: May 17, 2023
  • Number of updates: 9
  • Update frequency: every 10.1 days
  • Top authors: Sablab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /457 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.01ms] Passed 4 tests

Analyzing server-side resources used by Simple Keyword to Link
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0139.94 ▲1.69
Dashboard /wp-admin3.31 ▲0.0145.11 ▼2.09
Posts /wp-admin/edit.php3.36 ▲0.0146.91 ▼3.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.93 ▼12.46
Media Library /wp-admin/upload.php3.24 ▲0.0135.33 ▲3.56
delete /wp-admin/admin.php?page=simple-keyword-to-link-delete-element3.1826.26

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Keyword to Link
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.21 ▼1.201.80 ▲0.0941.39 ▲0.48
Dashboard /wp-admin2,218 ▲275.86 ▲1.00105.52 ▲4.2338.53 ▼6.35
Posts /wp-admin/edit.php2,104 ▲152.00 ▼0.0540.09 ▼2.5034.89 ▼3.44
Add New Post /wp-admin/post-new.php1,543 ▲1823.14 ▼0.06668.33 ▲53.4555.74 ▲5.39
Media Library /wp-admin/upload.php1,400 ▲124.21 ▲0.0797.56 ▼2.1940.18 ▼2.22
delete /wp-admin/admin.php?page=simple-keyword-to-link-delete-element1,6162.3026.0627.16

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/simple-keyword-to-link/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-keyword-to-link/simple-keyword-to-link.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/simple-keyword-to-link/views/credits.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Management screen. there is only one screenshot because the plugin is really "Very simple")
The official readme.txt is a good inspiration

simple-keyword-to-link/simple-keyword-to-link.php Passed 13 tests

"Simple Keyword to Link" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
104 characters long description:
Really Simple "Keyword to Link" Converter. Automatically create links for specific words in your content

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin277 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33327218
PO File1181950
Markdown1409

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png59.76KB17.13KB▼ 71.33%