10% deezer-widget

Code Review | Deezer Widget

WordPress plugin Deezer Widget scored 10% from 54 tests.

About plugin

  • Plugin page: deezer-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4.1
  • WordPress version: 6.3.1
  • First release: Aug 21, 2012
  • Latest release: Aug 21, 2012
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: perraudeaua (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 5,517 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/deezer-widget/deezer.php+46
    Methods with the same name as their class will not be constructors in a future version of PHP; Deezer_Playlist has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼55.56ms] Passed 4 tests

This is a short check of server-side resources used by Deezer Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.30 ▼37.54
Dashboard /wp-admin2.17 ▼1.145.33 ▼49.72
Posts /wp-admin/edit.php2.17 ▼1.197.75 ▼44.02
Add New Post /wp-admin/post-new.php2.17 ▼3.726.86 ▼90.94
Media Library /wp-admin/upload.php2.17 ▼1.065.83 ▼27.78

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 9 new options
New WordPress options
widget_deezer-playlist
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_deezer-album
widget_deezer-radio
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Deezer Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.504.78 ▲2.8341.90 ▼7.71
Dashboard /wp-admin2,206 ▲185.86 ▼0.01110.86 ▼5.8343.61 ▼1.15
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0640.80 ▲1.4835.39 ▼4.93
Add New Post /wp-admin/post-new.php1,542 ▲2218.36 ▼4.67618.48 ▼26.3651.28 ▼13.12
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0294.64 ▼0.3340.97 ▼2.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/deezer-widget/deezer.php+46
    Methods with the same name as their class will not be constructors in a future version of PHP; Deezer_Playlist has a deprecated constructor
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_deezer-playlist
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_deezer-radio
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_deezer-album

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 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/deezer-widget/deezer.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (An example album with cover), #2 (An example of radio (rock) with small dimension and without cover)
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

deezer-widget/deezer.php 92% from 13 tests

The primary PHP file in "Deezer Widget" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("deezer-widget.php" instead of "deezer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin267 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16539267

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity11.67
▷ Minimum class complexity11.00
▷ Maximum class complexity13.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot 2.png16.00KB4.87KB▼ 69.60%
screenshot 1.png78.91KB25.02KB▼ 68.30%