73% elk-lastfm

Code Review | ELK LastFM

WordPress plugin ELK LastFM scored 73% from 54 tests.

About plugin

  • Plugin page: elk-lastfm
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Dec 10, 2015
  • Latest release: Jan 29, 2016
  • Number of updates: 5
  • Update frequency: every 10.2 days
  • Top authors: elmarenkei (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 585 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.70MB] [CPU: ▼47.81ms] Passed 4 tests

A check of server-side resources used by ELK LastFM
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.178.62 ▼33.68
Dashboard /wp-admin2.31 ▼1.0011.13 ▼38.79
Posts /wp-admin/edit.php2.31 ▼1.0512.39 ▼39.33
Add New Post /wp-admin/post-new.php2.31 ▼3.5812.73 ▼79.45
Media Library /wp-admin/upload.php2.31 ▼0.929.46 ▼21.74

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_elk_lastfm_wp_widget
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

ELK LastFM: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.515.25 ▲3.3240.33 ▼0.63
Dashboard /wp-admin2,203 ▲155.79 ▼0.10110.79 ▲1.0342.02 ▲1.43
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0639.35 ▼1.5237.69 ▲1.32
Add New Post /wp-admin/post-new.php1,534 ▲2023.17 ▲5.59608.87 ▼90.3657.13 ▼13.22
Media Library /wp-admin/upload.php1,385 ▼34.24 ▼0.0497.81 ▼9.4044.75 ▼1.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ELK_LastFM_WP_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_elk_lastfm_wp_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elk-lastfm/elk_lastfm_wp.php:27

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (/assets/screenshot-1.jpg), #2 (/assets/screenshot-2.jpg)
The official readme.txt might help

elk-lastfm/elk_lastfm_wp.php 85% from 13 tests

The main PHP script in "ELK LastFM" version 1.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 151 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("elk-lastfm.php" instead of "elk_lastfm_wp.php")

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 plugin192 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22328166
CSS14026

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.00
▷ Minimum class complexity8.00
▷ Maximum class complexity24.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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