84% mykraft-responsive-video-shortcode

Code Review | Mykraft Responsive Video Shortcode

WordPress plugin Mykraft Responsive Video Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: mykraft-responsiv...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Dec 2, 2014
  • Latest release: Oct 18, 2022
  • Number of updates: 40
  • Update frequency: every 72.0 days
  • Top authors: gojak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,376 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.12ms] Passed 4 tests

A check of server-side resources used by Mykraft Responsive Video Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.80 ▼3.75
Dashboard /wp-admin3.31 ▲0.0144.30 ▼6.77
Posts /wp-admin/edit.php3.37 ▲0.0145.38 ▲1.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.05 ▼11.88
Media Library /wp-admin/upload.php3.24 ▲0.0137.94 ▲3.11

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Mykraft Responsive Video Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.60 ▲0.081.99 ▲0.5448.86 ▲11.41
Dashboard /wp-admin2,195 ▲155.58 ▼0.0883.23 ▼8.1336.83 ▼0.42
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0434.82 ▼3.3931.20 ▼1.08
Add New Post /wp-admin/post-new.php1,537 ▲918.21 ▼4.98625.05 ▼7.1967.35 ▼25.33
Media Library /wp-admin/upload.php1,394 ▼64.17 ▼0.07106.31 ▲5.1745.71 ▲1.78

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • 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
Even though no errors were found, 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
Almost there! Just fix the following items
  • 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/mykraft-responsive-video-shortcode/mykraft-responsive-video-shortcode.php:21

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: wordpress, responsive, video, shortcode, plugin

mykraft-responsive-video-shortcode/mykraft-responsive-video-shortcode.php 92% from 13 tests

The principal PHP file in "Mykraft Responsive Video Shortcode" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 167 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
Good job! No executable or dangerous file extensions detected87 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP181932
CSS10019
PO File15619
JavaScript10117

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/icon/video.png5.97KB2.65KB▼ 55.57%