83% wdes-rtmedia-music

Code Review | WDES rtMedia Music

WordPress plugin WDES rtMedia Music scored83%from 54 tests.

About plugin

  • Plugin page: wdes-rtmedia-music
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.0
  • WordPress version: 6.3.1
  • First release: Jan 13, 2017
  • Latest release: Jun 1, 2019
  • Number of updates: 35
  • Update frequency: every 24.8 days
  • Top authors: master buldog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,015 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.00MB] [CPU: ▼5.51ms] Passed 4 tests

A check of server-side resources used by WDES rtMedia Music
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.21 ▼3.75
Dashboard /wp-admin3.31 ▲0.0046.26 ▼2.75
Posts /wp-admin/edit.php3.36 ▲0.0049.03 ▲3.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.56 ▼14.65
Media Library /wp-admin/upload.php3.23 ▲0.0035.11 ▼0.88

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WDES rtMedia Music
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.32 ▲0.041.73 ▲0.1436.70 ▼4.53
Dashboard /wp-admin2,195 ▲245.61 ▼0.0290.40 ▼7.4739.01 ▼6.54
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0539.41 ▲3.8537.43 ▼5.78
Add New Post /wp-admin/post-new.php1,534 ▲818.69 ▼4.38609.21 ▼31.5668.76 ▲14.43
Media Library /wp-admin/upload.php1,403 ▼04.21 ▼0.0096.10 ▼17.3040.44 ▼8.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wdes-rtmedia-music/lib/core/actions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wdes-rtmedia-music/lib/core/globals.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% 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
Attributes that require attention:
  • Screenshots: Please a description for screenshot #4 in wdes-rtmedia-music/assets to your readme.txt
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt might help

wdes-rtmedia-music/wdes-rtmedia-music.php 85% from 13 tests

This is the main PHP file of "WDES rtMedia Music" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 300 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,602 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14102361,041
SVG100655
CSS211528
JavaScript206378

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods120.00%
▷ Protected methods00.00%
▷ Private methods480.00%
Functions71
▷ Named functions6692.96%
▷ Anonymous functions57.04%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/music.png8.03KB3.39KB▼ 57.83%
assets/images/audio.png0.37KB0.57KB0.00%