83% wp-media-player-addons

Code Review | WP Media Player Addons

WordPress plugin WP Media Player Addons scored83%from 54 tests.

About plugin

  • Plugin page: wp-media-player-a...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.0
  • WordPress version: 6.3.1
  • First release: Sep 8, 2017
  • Latest release: Jan 29, 2019
  • Number of updates: 13
  • Update frequency: every 39.2 days
  • Top authors: themestones (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /2,919 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by WP Media Player Addons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.55 ▼3.98
Dashboard /wp-admin3.34 ▲0.0043.50 ▼27.04
Posts /wp-admin/edit.php3.40 ▲0.0449.84 ▲1.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.38 ▼6.69
Media Library /wp-admin/upload.php3.27 ▲0.0435.80 ▲0.27

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Media Player Addons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.24 ▼1.131.46 ▼0.1837.31 ▼1.55
Dashboard /wp-admin2,206 ▲155.91 ▲1.04105.87 ▼10.0038.60 ▼6.52
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0439.74 ▲2.6133.97 ▼2.86
Add New Post /wp-admin/post-new.php1,533 ▼023.32 ▲0.13587.53 ▼94.1953.21 ▼9.54
Media Library /wp-admin/upload.php1,382 ▼94.20 ▲0.0297.38 ▼2.2839.93 ▼5.28

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-media-player-addons/wmp.php:31

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

wp-media-player-addons/wmp.php 85% from 13 tests

Analyzing the main PHP file in "WP Media Player Addons" version 1.0.2
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-media-player-addons.php" instead of "wmp.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,483 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS3531,142
PHP15417219
SVG10068
JavaScript212754

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
There were not PNG files found in your plugin