84% responsive-media

Code Review | Responsive Media

WordPress plugin Responsive Media scored84%from 54 tests.

About plugin

  • Plugin page: responsive-media
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Mar 24, 2016
  • Latest release: May 29, 2018
  • Number of updates: 18
  • Update frequency: every 44.2 days
  • Top authors: jeroenooms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,904 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Responsive Media
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.66 ▼2.38
Dashboard /wp-admin3.33 ▼0.0145.59 ▼13.42
Posts /wp-admin/edit.php3.38 ▲0.0348.06 ▼5.81
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.89 ▼12.28
Media Library /wp-admin/upload.php3.25 ▲0.0332.84 ▼2.93
Responsive Media /wp-admin/options-general.php?page=responsive_media_options3.2228.79

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Responsive Media
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.24 ▼1.411.99 ▲0.2941.62 ▼2.85
Dashboard /wp-admin2,207 ▲225.82 ▲0.92105.47 ▲3.5340.81 ▼4.38
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0438.85 ▼2.3435.87 ▼1.36
Add New Post /wp-admin/post-new.php1,539 ▲1923.16 ▼0.20659.37 ▲1.4960.31 ▲3.43
Media Library /wp-admin/upload.php1,383 ▼24.26 ▲0.0397.51 ▼11.8343.39 ▼3.28
Responsive Media /wp-admin/options-general.php?page=responsive_media_options8602.0323.5528.42

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • responsive_media_option
    • widget_recent-posts
    • theysaidso_admin_options

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/responsive-media/responsive-media.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === responsive-media === )
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
You can look at the official readme.txt

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

The main PHP file in "Responsive Media" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
35 characters long description:
Make auto embedded media responsive

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected185 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24051157
PO File17928

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected