84% lastfm-played-for-wp

Code Review | LastFM Played for Wordpress

WordPress plugin LastFM Played for Wordpress scored 84% from 54 tests.

About plugin

  • Plugin page: lastfm-played-for-wp
  • Plugin version: 0.99.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Jan 22, 2015
  • Latest release: Jul 30, 2017
  • Number of updates: 37
  • Update frequency: every 24.9 days
  • Top authors: mangorausch (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 3,928 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
Installer ran successfully

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

A check of server-side resources used by LastFM Played for Wordpress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.47 ▼6.48
Dashboard /wp-admin3.32 ▲0.0146.60 ▼5.41
Posts /wp-admin/edit.php3.37 ▲0.0148.21 ▼0.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.23 ▼9.21
Media Library /wp-admin/upload.php3.24 ▲0.0135.72 ▲0.24

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_lastfm_widget
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for LastFM Played for Wordpress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.30 ▼1.061.64 ▼0.3242.24 ▼7.17
Dashboard /wp-admin2,203 ▲114.89 ▼0.10108.75 ▲4.8238.66 ▼6.83
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0939.05 ▲0.2436.15 ▲5.91
Add New Post /wp-admin/post-new.php1,519 ▼123.50 ▲0.10679.84 ▼14.7460.19 ▲2.98
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.0495.47 ▼19.3044.30 ▲0.95

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_lastfm_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lastfm-played-for-wp/index.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: lastfm, last fm, scrobble

lastfm-played-for-wp/index.php 92% from 13 tests

This is the main PHP file of "LastFM Played for Wordpress" version 0.99.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lastfm-played-for-wp.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected148 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12410108
CSS18040

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin