83% media-playback-speed

Code Review | Media Playback Speed

WordPress plugin Media Playback Speed scored83%from 54 tests.

About plugin

  • Plugin page: media-playback-speed
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 8, 2017
  • Latest release: Jul 5, 2022
  • Number of updates: 21
  • Update frequency: every 79.5 days
  • Top authors: LewisCowles (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /5,123 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.23ms] Passed 4 tests

Analyzing server-side resources used by Media Playback Speed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.86 ▼4.29
Dashboard /wp-admin3.32 ▲0.0248.92 ▼6.49
Posts /wp-admin/edit.php3.37 ▲0.0253.86 ▼2.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.32 ▼2.36
Media Library /wp-admin/upload.php3.24 ▲0.0132.34 ▼7.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Media Playback Speed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.73 ▲0.202.37 ▲0.8143.66 ▼1.11
Dashboard /wp-admin2,192 ▲155.62 ▼0.0488.73 ▼9.0338.29 ▼0.41
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0440.23 ▲0.5938.07 ▼0.34
Add New Post /wp-admin/post-new.php1,531 ▲523.12 ▲0.05652.87 ▼21.7865.08 ▼2.18
Media Library /wp-admin/upload.php1,400 ▼04.35 ▲0.1596.88 ▼4.5742.88 ▼4.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-playback-speed/index.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

media-playback-speed/index.php 85% from 13 tests

The main PHP file in "Media Playback Speed" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Git Repository: An alternative Git repository was detected
  • Main file name: The principal plugin file should be the same as the plugin slug ("media-playback-speed.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin187 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1162272
Markdown229058
PHP12637
YAML13020

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.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.73MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-772x250.png129.25KB50.15KB▼ 61.20%
.wordpress-org/icon-256x256.png42.73KB20.02KB▼ 53.15%
.wordpress-org/icon-128x128.png22.63KB8.95KB▼ 60.44%
screenshot-1.png81.40KB50.29KB▼ 38.23%
.wordpress-org/banner-1544x500.png476.54KB210.04KB▼ 55.92%