84% adapter-responsive-video

Code Review | Adapter Responsive Video

WordPress plugin Adapter Responsive Video scored 84% from 54 tests.

About plugin

  • Plugin page: adapter-responsiv...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 5.9.2
  • First release: Sep 24, 2014
  • Latest release: Sep 16, 2018
  • Number of updates: 8
  • Update frequency: every 181.8 days
  • Top authors: ryankienstra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,266 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 gracefully, with no errors

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

This is a short check of server-side resources used by Adapter Responsive Video
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0257.23 ▲6.68
Dashboard /wp-admin3.42 ▲0.0133.07 ▲0.50
Posts /wp-admin/edit.php3.65 ▲0.0137.80 ▼0.28
Add New Post /wp-admin/post-new.php6.89 ▼0.0895.73 ▼1,183.84
Media Library /wp-admin/upload.php3.30 ▲0.0124.77 ▲1.66

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options
widget_adapter_responsive_video

Browser metrics Passed 4 tests

This is an overview of browser requirements for Adapter Responsive Video
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲4115.86 ▲0.228.12 ▲1.862.24 ▼0.16
Dashboard /wp-admin2,889 ▲355.99 ▼0.22119.83 ▼11.81154.98 ▼2.30
Posts /wp-admin/edit.php2,688 ▼03.24 ▲0.0162.38 ▼0.83140.15 ▼2.87
Add New Post /wp-admin/post-new.php1,752 ▲9121.66 ▲0.53460.08 ▲39.30156.12 ▲2.39
Media Library /wp-admin/upload.php1,698 ▼05.48 ▲0.01139.08 ▼17.36182.86 ▼11.37

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_adapter_responsive_video

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 no errors were found, 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/adapter-responsive-video/php/class-adapter-responsive-video-widget.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/adapter-responsive-video/php/class-adapter-responsive-video-widget.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: responsive, post, mobile, embed, bootstrap...

adapter-responsive-video/adapter-responsive-video.php 92% from 13 tests

The primary PHP file in "Adapter Responsive Video" version 1.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected3,979 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JSON1003,833
PHP335132124
XML15222

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.27
Average class complexity9.50
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin