84% img-responsive

Code Review | Bootstrap img-responsive

WordPress plugin Bootstrap img-responsive scored84%from 54 tests.

About plugin

  • Plugin page: img-responsive
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Aug 30, 2016
  • Latest release: Aug 30, 2016
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: webfwd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,536 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.42ms] Passed 4 tests

A check of server-side resources used by Bootstrap img-responsive
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.72 ▼1.17
Dashboard /wp-admin3.32 ▼0.0346.88 ▼11.80
Posts /wp-admin/edit.php3.37 ▲0.0144.01 ▼3.74
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.48 ▼20.98
Media Library /wp-admin/upload.php3.24 ▲0.0133.51 ▼1.03

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
bsir_version
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Bootstrap img-responsive
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.23 ▼0.141.97 ▲0.2945.02 ▲2.16
Dashboard /wp-admin2,198 ▲185.66 ▲0.0196.67 ▲11.3842.29 ▼4.11
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0135.03 ▼8.7333.69 ▼2.92
Add New Post /wp-admin/post-new.php1,526 ▼223.21 ▲0.16689.15 ▲34.6955.90 ▼13.85
Media Library /wp-admin/upload.php1,400 ▲34.18 ▼0.0094.13 ▼9.3243.66 ▼3.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • bsir_version
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/img-responsive/img-responsive.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
1 plugin tags: bootstrap image responsive img alt class css less sass mobile media queries title tags img-responsive

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

The primary PHP file in "Bootstrap img-responsive" version 1.0 is used by WordPress to initiate all plugin functionality
68 characters long description:
Automatically add img-responsive class to all post and page content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1192532

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.11
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%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin