84% img-fluid

Code Review | Bootstrap v4 img-fluid

WordPress plugin Bootstrap v4 img-fluid scored84%from 54 tests.

About plugin

  • Plugin page: img-fluid
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Nov 9, 2016
  • Latest release: Nov 4, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: webfwd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,029 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Bootstrap v4 img-fluid
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.87 ▼3.46
Dashboard /wp-admin3.32 ▲0.0150.15 ▼3.67
Posts /wp-admin/edit.php3.37 ▲0.0147.22 ▼1.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.30 ▼11.85
Media Library /wp-admin/upload.php3.24 ▲0.0135.36 ▼6.02

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
db_upgraded
can_compress_scripts
bsif_version
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Bootstrap v4 img-fluid
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.441.74 ▼0.2044.17 ▼0.54
Dashboard /wp-admin2,195 ▲155.65 ▼0.0186.77 ▼5.8339.97 ▲3.24
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0337.06 ▼3.2335.39 ▼1.44
Add New Post /wp-admin/post-new.php1,526 ▼223.00 ▼0.08686.14 ▲19.0061.62 ▲2.11
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.0798.40 ▼13.1544.14 ▼2.91

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • bsif_version
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/img-fluid/img-responsive.php:45

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: bootstrap bootstrap4 image fluid img alt class css less sass mobile media queries title tags img-responsive

img-fluid/img-responsive.php 92% from 13 tests

The main file in "Bootstrap v4 img-fluid" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("img-fluid.php" instead of "img-responsive.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1192532

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin