90% responsive-block-control

Code Review | Responsive Block Control - Hide blocks based on display width

WordPress plugin Responsive Block Control - Hide blocks based on display width scored90%from 54 tests.

About plugin

  • Plugin page: responsive-block-...
  • Plugin version: 1.2.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 30, 2020
  • Latest release: Oct 7, 2023
  • Number of updates: 46
  • Update frequency: every 29.2 days
  • Top authors: landwire (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /7,340 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.65ms] Passed 4 tests

Server-side resources used by Responsive Block Control - Hide blocks based on display width
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.88 ▼1.40
Dashboard /wp-admin3.35 ▲0.0444.14 ▼2.49
Posts /wp-admin/edit.php3.40 ▲0.0447.37 ▼5.77
Add New Post /wp-admin/post-new.php7.21 ▲1.3290.07 ▼4.95
Media Library /wp-admin/upload.php3.27 ▲0.0441.90 ▲7.05

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Responsive Block Control - Hide blocks based on display width
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.42 ▼0.937.99 ▲6.4140.54 ▼4.22
Dashboard /wp-admin2,192 ▲155.56 ▼0.1081.58 ▼5.2339.10 ▼6.02
Posts /wp-admin/edit.php2,097 ▼02.01 ▲0.0536.14 ▲1.0834.50 ▲0.82
Add New Post /wp-admin/post-new.php1,538 ▲1224.39 ▲0.98702.03 ▲94.6462.19 ▲15.17
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.01109.39 ▲8.9047.20 ▲5.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: visibility, hide content, responsive, width, block

responsive-block-control/responsive-block-control.php Passed 13 tests

The entry point to "Responsive Block Control - Hide blocks based on display width" version 1.2.9 is a PHP file that has certain tags in its header comment area
134 characters long description:
Responsive Block Control adds responsive toggles to a "Visibility" panel of the block editor to hide blocks according to screen width.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected161 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24769154
JavaScript221796
CSS1011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

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