10% lkdto-widget

Code Review | lkd.to Widget

WordPress plugin lkd.to Widget scored10%from 54 tests.

About plugin

  • Plugin page: lkdto-widget
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.7
  • WordPress version: 6.3.1
  • First release: Oct 24, 2013
  • Latest release: Dec 8, 2013
  • Number of updates: 8
  • Update frequency: every 5.8 days
  • Top authors: stephensauceda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /646 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/lkdto-widget/lkdto_widget.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; Lkdto_Widget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼51.22ms] Passed 4 tests

A check of server-side resources used by lkd.to Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.52 ▼36.05
Dashboard /wp-admin2.08 ▼1.224.72 ▼45.61
Posts /wp-admin/edit.php2.08 ▼1.275.59 ▼40.39
Add New Post /wp-admin/post-new.php2.08 ▼3.805.09 ▼82.84
Media Library /wp-admin/upload.php2.08 ▼1.145.62 ▼25.53

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for lkd.to Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.16 ▼1.231.60 ▼0.1841.70 ▼5.51
Dashboard /wp-admin2,206 ▲185.84 ▲0.95109.24 ▼5.6642.03 ▼6.57
Posts /wp-admin/edit.php2,089 ▼31.97 ▼0.0640.06 ▼0.8235.86 ▼0.96
Add New Post /wp-admin/post-new.php1,535 ▲223.33 ▲0.04680.26 ▼8.3261.35 ▲4.04
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0198.39 ▼15.3540.54 ▼9.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/lkdto-widget/lkdto_widget.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; Lkdto_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_lkdto_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lkdto-widget/lkdto_widget.php:11

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: lkdto, links

lkdto-widget/lkdto_widget.php 92% from 13 tests

The primary PHP file in "lkd.to Widget" version 0.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lkdto-widget.php" instead of "lkdto_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin58 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP120958

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin