78% top-music-charts-widget

Code Review | Top Music Charts Widget

WordPress plugin Top Music Charts Widget scored78%from 54 tests.

About plugin

  • Plugin page: top-music-charts-...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 4, 2016
  • Latest release: Apr 2, 2018
  • Number of updates: 4
  • Update frequency: every 189.7 days
  • Top authors: grimmdude (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /5,470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.29ms] Passed 4 tests

This is a short check of server-side resources used by Top Music Charts Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0343.41 ▲1.15
Dashboard /wp-admin3.34 ▲0.0455.74 ▼8.39
Posts /wp-admin/edit.php3.39 ▲0.0353.65 ▲0.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.73 ▼13.85
Media Library /wp-admin/upload.php3.26 ▲0.0333.14 ▼3.16

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_top_music_charts_widget
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Top Music Charts Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▼0.282.25 ▲0.2544.21 ▲0.23
Dashboard /wp-admin2,195 ▲185.60 ▲0.0690.20 ▼7.6842.39 ▲0.81
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0335.38 ▼1.9534.45 ▼0.22
Add New Post /wp-admin/post-new.php1,526 ▼023.14 ▼0.50659.92 ▲24.4556.26 ▲3.66
Media Library /wp-admin/upload.php1,400 ▼34.10 ▼0.1599.15 ▼1.8341.34 ▼5.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_top_music_charts_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/top-music-charts-widget/top-music-charts-widget.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-simplepie.php' (include_path='.:/usr/share/php') in wp-content/plugins/top-music-charts-widget/class-simplepie-sort.php on line 4
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/top-music-charts-widget/class-simplepie-sort.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/top-music-charts-widget/class-simplepie-sort.php on line 4
    • > PHP Warning
      require_once(ABSPATHWPINC/class-simplepie.php): failed to open stream: No such file or directory in wp-content/plugins/top-music-charts-widget/class-simplepie-sort.php on line 4

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add an image for screenshot #1 (Screenshot of widget.)
You can look at the official readme.txt

top-music-charts-widget/top-music-charts-widget.php Passed 13 tests

"Top Music Charts Widget" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
75 characters long description:
Display a widget showing the current top Billboard charts of your choosing.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin144 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP344102144

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png34.78KB9.05KB▼ 73.98%
screenshot-2.png50.12KB14.41KB▼ 71.25%