84% last-fm

Code Review | Last FM

WordPress plugin Last FM scored84%from 54 tests.

About plugin

  • Plugin page: last-fm
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-5.2
  • WordPress version: 6.3.1
  • First release: Nov 20, 2015
  • Latest release: Apr 28, 2019
  • Number of updates: 11
  • Update frequency: every 291.2 days
  • Top authors: KieranOShea (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /2,704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.77ms] Passed 4 tests

A check of server-side resources used by Last FM
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.27 ▼4.64
Dashboard /wp-admin3.37 ▲0.0247.49 ▼13.15
Posts /wp-admin/edit.php3.42 ▲0.0649.80 ▲4.15
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.09 ▼3.44
Media Library /wp-admin/upload.php3.29 ▲0.0635.78 ▲2.14

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Last FM
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.37 ▼1.071.65 ▼0.1644.11 ▼0.24
Dashboard /wp-admin2,231 ▲435.90 ▲0.01114.35 ▲7.2143.08 ▲2.66
Posts /wp-admin/edit.php2,117 ▲282.01 ▲0.0040.21 ▼0.3837.16 ▲1.16
Add New Post /wp-admin/post-new.php1,555 ▲2723.43 ▲5.21593.31 ▼28.7758.27 ▼2.20
Media Library /wp-admin/upload.php1,413 ▲224.26 ▼0.0294.54 ▼6.9841.50 ▼4.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/last-fm/last-fm.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (The Last FM configuration screen in the admin panel), #2 (Last FM widget in use on a site)
You can take inspiration from this readme.txt

last-fm/last-fm.php Passed 13 tests

The main PHP file in "Last FM" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
74 characters long description:
Permits the display in your sidebar of your most recent listened to tracks

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected226 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12442226

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions13
▷ Named functions13100.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.25KB7.14KB▼ 60.86%
screenshot-2.png15.98KB5.81KB▼ 63.66%