84% wp-responsive-media

Code Review | WP Responsive Media

WordPress plugin WP Responsive Media scored84%from 54 tests.

About plugin

  • Plugin page: wp-responsive-media
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9.1
  • WordPress version: 6.3.1
  • First release: Aug 21, 2014
  • Latest release: Aug 22, 2014
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: randyjensen (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.28MB] [CPU: ▼12.89ms] Passed 4 tests

Analyzing server-side resources used by WP Responsive Media
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.90 ▼3.70
Dashboard /wp-admin3.35 ▲0.0559.14 ▲8.18
Posts /wp-admin/edit.php3.46 ▲0.1153.63 ▲5.10
Add New Post /wp-admin/post-new.php4.64 ▼1.2545.63 ▼56.58
Media Library /wp-admin/upload.php3.27 ▲0.0438.39 ▲3.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Responsive Media
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.27 ▼1.104.79 ▲2.9942.15 ▼1.24
Dashboard /wp-admin2,224 ▲214.87 ▼1.04100.92 ▼6.1544.36 ▼5.28
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0640.05 ▼0.9536.23 ▼0.83
Add New Post /wp-admin/post-new.php1,540 ▼523.43 ▲0.07632.48 ▼27.2961.96 ▼8.84
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.0195.50 ▼6.0443.05 ▼0.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • wp_responsive_media_version
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-responsive-media/includes/lib/class-wp-responsive-media-admin-main.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: rwd, images, responsive, media

wp-responsive-media/wp-responsive-media.php Passed 13 tests

The entry point to "WP Responsive Media" version 1.0.5 is a PHP file that has certain tags in its header comment area
39 characters long description:
Seamless responsive media for WordPress

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
There were no executable files found in this plugin248 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP456183141
JavaScript32420107

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin