63% wp-spotify

Code Review | WP-Spotify

WordPress plugin WP-Spotify scored63%from 54 tests.

About plugin

  • Plugin page: wp-spotify
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.3.1
  • WordPress version: 6.3.1
  • First release: May 21, 2010
  • Latest release: Feb 6, 2012
  • Number of updates: 65
  • Update frequency: every 9.6 days
  • Top authors: NEOLiNES (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /7,794 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.93MB] [CPU: ▼61.28ms] Passed 4 tests

This is a short check of server-side resources used by WP-Spotify
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.77 ▼37.44
Dashboard /wp-admin2.09 ▼1.265.82 ▼61.70
Posts /wp-admin/edit.php2.09 ▼1.275.52 ▼48.19
Add New Post /wp-admin/post-new.php2.09 ▼3.807.67 ▼97.77
Media Library /wp-admin/upload.php2.09 ▼1.145.16 ▼31.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: 1 new table, 7 new options
New tables
wp_spotify
New WordPress options
wp-spotify
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-Spotify
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲8314.48 ▼0.061.90 ▼0.0637.95 ▼3.19
Dashboard /wp-admin2,215 ▲245.83 ▲0.9499.77 ▼8.0944.99 ▲0.87
Posts /wp-admin/edit.php2,104 ▲182.02 ▲0.0136.77 ▼2.7639.89 ▲6.77
Add New Post /wp-admin/post-new.php1,372 ▼16120.78 ▲2.19600.74 ▼55.2636.42 ▼19.06
Media Library /wp-admin/upload.php1,400 ▲94.23 ▲0.04100.45 ▼1.7344.81 ▼2.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_spotify
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • wp-spotify
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/wp-spotify/wp-spotify.class.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-spotify === )
  • Screenshots: Add images for these screenshots: #1 (Layout), #2 (Embeded), #3 (Widget-control)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

wp-spotify/wp-spotify.php Passed 13 tests

The principal PHP file in "WP-Spotify" v. 2.0 is loaded by WordPress automatically on each request
62 characters long description:
Link Spotify tracks to your posts and pages. Including widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin448 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2188250
CSS160198

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.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 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.86MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/share.png1.56KB0.54KB▼ 65.60%
screenshot-3.png36.53KB15.70KB▼ 57.02%
banner.png73.06KB27.96KB▼ 61.73%
img/album.png3.03KB0.37KB▼ 87.71%
screenshot-1.png716.22KB229.11KB▼ 68.01%