83% karma-by-kadar

Code Review | Karma Music Player by Kadar

WordPress plugin Karma Music Player by Kadar scored83%from 54 tests.

About plugin

  • Plugin page: karma-by-kadar
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0
  • WordPress version: 6.3.1
  • First release: Jul 10, 2017
  • Latest release: Oct 20, 2018
  • Number of updates: 19
  • Update frequency: every 24.6 days
  • Top authors: kadarclaudiu (100%)

Code review

54 tests

User reviews

40 reviews

Install metrics

1,000+ active /13,079 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▲2.32ms] Passed 4 tests

Server-side resources used by Karma Music Player by Kadar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1444.36 ▲1.71
Dashboard /wp-admin3.42 ▲0.1254.26 ▲5.53
Posts /wp-admin/edit.php3.54 ▲0.1857.99 ▲9.72
Add New Post /wp-admin/post-new.php6.02 ▲0.1392.25 ▼7.67
Media Library /wp-admin/upload.php3.35 ▲0.1144.64 ▲12.15

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
widget_karma_by_kadar__simple_player__widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Karma Music Player by Kadar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,990 ▲25513.84 ▼0.8111.34 ▲9.5944.24 ▼2.04
Dashboard /wp-admin2,268 ▲805.86 ▲0.9397.36 ▼4.3140.28 ▼5.28
Posts /wp-admin/edit.php2,154 ▲622.19 ▲0.1438.50 ▼2.0734.56 ▲0.29
Add New Post /wp-admin/post-new.php1,568 ▲5423.44 ▲5.90671.62 ▼23.4459.59 ▲8.14
Media Library /wp-admin/upload.php1,447 ▲594.24 ▲0.08102.80 ▲5.6041.50 ▼4.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_karma_by_kadar__simple_player__widget
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/karma-by-kadar/lib/includes/karma_by_kadar__scripts-styles__widgets.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/karma-by-kadar/lib/integrations/widgets/karma_by_kadar__widgets.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/karma-by-kadar/karma-by-kadar.php:13

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

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in karma-by-kadar/assets to your readme.txt
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

karma-by-kadar/karma-by-kadar.php 92% from 13 tests

The main PHP script in "Karma Music Player by Kadar" version 1.1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 165 characters long)

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
No dangerous file extensions were detected6,256 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript74383933,912
Sass62420985
PHP12125183740
CSS46820608
SVG10011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1466.67%
▷ Protected methods29.52%
▷ Private methods523.81%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin