84% responsive-containers

Code Review | Responsive Containers

WordPress plugin Responsive Containers scored84%from 54 tests.

About plugin

  • Plugin page: responsive-contai...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2019
  • Latest release: Jul 20, 2019
  • Number of updates: 5
  • Update frequency: every 1.8 days
  • Top authors: kadamwhite (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,060 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.00MB] [CPU: ▲0.18ms] Passed 4 tests

Analyzing server-side resources used by Responsive Containers
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.69 ▼3.06
Dashboard /wp-admin3.31 ▲0.0050.61 ▲3.94
Posts /wp-admin/edit.php3.36 ▲0.0050.91 ▲0.85
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.35 ▲1.06
Media Library /wp-admin/upload.php3.23 ▲0.0035.13 ▲1.86

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Responsive Containers
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.34 ▼1.343.69 ▲1.5856.36 ▲6.65
Dashboard /wp-admin2,206 ▲184.86 ▼0.19111.80 ▲1.0338.57 ▼3.27
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0539.39 ▼3.0637.90 ▲1.50
Add New Post /wp-admin/post-new.php1,516 ▼417.58 ▼5.59642.04 ▼21.5458.83 ▲7.41
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.03100.38 ▲4.5943.45 ▲2.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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)
Good news, no errors were detected

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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-containers/responsive-containers.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (The same block may be inserted anywhere on the page and will receive different classes depending on the size of their parent. These classes may be used to easily style your blocks for a variety of contexts. In this screenshot you can see that an example "responsive container" block receives the `.container-sm` class when constrained within a narrow column, `.container-xl` when full-width, and so on.) image not found
The official readme.txt might help

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

The primary PHP file in "Responsive Containers" version 1.1.0 is used by WordPress to initiate all plugin functionality
56 characters long description:
Easily style responsive containers using ResizeObserver.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,668 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61419321,604
JSON10052
PHP122612

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin