79% widget-music-chart

Code Review | Widget Music Chart

WordPress plugin Widget Music Chart scored79%from 54 tests.

About plugin

  • Plugin page: widget-music-chart
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 16, 2020
  • Latest release: Feb 17, 2022
  • Number of updates: 7
  • Update frequency: every 100.9 days
  • Top authors: meohen1989 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /2,599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Widget Music Chart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.01 ▲0.99
Dashboard /wp-admin3.32 ▲0.0252.04 ▼1.66
Posts /wp-admin/edit.php3.37 ▲0.0149.75 ▼5.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.19 ▼14.53
Media Library /wp-admin/upload.php3.24 ▲0.0136.94 ▲2.88

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_widget-music-chart
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Widget Music Chart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲16813.40 ▼0.938.92 ▲7.2445.26 ▲4.86
Dashboard /wp-admin2,200 ▲235.63 ▲0.0383.18 ▼9.2640.71 ▼3.72
Posts /wp-admin/edit.php2,102 ▼12.02 ▲0.0237.99 ▼6.5533.75 ▼2.53
Add New Post /wp-admin/post-new.php1,530 ▼522.93 ▲4.71679.65 ▲71.0152.51 ▼18.41
Media Library /wp-admin/upload.php1,402 ▲24.24 ▲0.0694.55 ▼6.3847.20 ▲2.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_widget-music-chart
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/widget-music-chart/admin/form.php
    • > /wp-content/plugins/widget-music-chart/widget-music-chart.php
    • > /wp-content/plugins/widget-music-chart/helper.php
    • > /wp-content/plugins/widget-music-chart/layouts/default.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Rct567\\DomQuery\\DomQueryNodes' not found in wp-content/plugins/widget-music-chart/vendor/DomQuery/DomQuery.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: us, music, chart, billboard, officialchart...

widget-music-chart/widget-music-chart.php Passed 13 tests

"Widget Music Chart" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
Allows you to show charts from billboard.com or officialcharts.com

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
Everything looks great! No dangerous files found in this plugin2,008 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP74007741,895
CSS116068
JavaScript28042
SVG3033

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity77.80
▷ Minimum class complexity17.00
▷ Maximum class complexity182.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods108
▷ Static methods2119.44%
▷ Public methods8175.00%
▷ Protected methods1614.81%
▷ Private methods1110.19%
Functions14
▷ Named functions17.14%
▷ Anonymous functions1392.86%
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
No PNG files were detected