84% flexible-spacer-block

Code Review | Flexible Spacer Block

WordPress plugin Flexible Spacer Block scored84%from 54 tests.

About plugin

  • Plugin page: flexible-spacer-b...
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: Jan 28, 2021
  • Latest release: Oct 18, 2023
  • Number of updates: 21
  • Update frequency: every 47.3 days
  • Top authors: wildworks (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /11,834 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
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.21ms] Passed 4 tests

A check of server-side resources used by Flexible Spacer Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1538.89 ▼0.41
Dashboard /wp-admin3.45 ▲0.1044.89 ▼14.47
Posts /wp-admin/edit.php3.57 ▲0.2150.48 ▲7.55
Add New Post /wp-admin/post-new.php6.04 ▲0.1584.00 ▼9.67
Media Library /wp-admin/upload.php3.38 ▲0.1435.48 ▲3.72
Flexible Spacer Block /wp-admin/options-general.php?page=flexible-spacer-block-option3.3432.21

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Flexible Spacer Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.31 ▼0.041.70 ▼0.0240.09 ▼0.74
Dashboard /wp-admin2,193 ▲225.55 ▲0.0492.31 ▲6.8138.68 ▼4.73
Posts /wp-admin/edit.php2,104 ▲42.09 ▲0.1439.41 ▲3.2935.98 ▲3.23
Add New Post /wp-admin/post-new.php1,705 ▲17922.09 ▼1.64648.07 ▲3.8050.11 ▼11.78
Media Library /wp-admin/upload.php1,407 ▲44.28 ▲0.1093.90 ▼0.9042.03 ▲0.60
Flexible Spacer Block /wp-admin/options-general.php?page=flexible-spacer-block-option1,0902.1422.0833.81

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Flexible_Spacer_Block\\is_admin() in wp-content/plugins/flexible-spacer-block/classes/class-options.php:360
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Flexible_Spacer_Block\\add_action() in wp-content/plugins/flexible-spacer-block/classes/class-enqueue.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: gutenberg, block, spacer, responsive

flexible-spacer-block/flexible-spacer-block.php Passed 13 tests

The main PHP script in "Flexible Spacer Block" version 2.2.0 is automatically included on every request by WordPress
72 characters long description:
Add white space between blocks and customize its height for each device.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,256 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript95045521
PHP579146476
Sass2335174
JSON20083
CSS2002

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.31
Average class complexity16.33
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods1881.82%
▷ Protected methods00.00%
▷ Private methods418.18%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants433.33%
▷ Class constants866.67%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin