84% block-areas

Code Review | Block Areas

WordPress plugin Block Areas scored84%from 54 tests.

About plugin

  • Plugin page: block-areas
  • Plugin version: 0.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: Jul 4, 2019
  • Latest release: Aug 20, 2019
  • Number of updates: 4
  • Update frequency: every 11.8 days
  • Top authors: flixos90 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /278,189 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.15ms] Passed 4 tests

A check of server-side resources used by Block Areas
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1543.35 ▲1.55
Dashboard /wp-admin3.45 ▲0.1448.21 ▼4.85
Posts /wp-admin/edit.php3.56 ▲0.2051.32 ▲0.62
Add New Post /wp-admin/post-new.php6.10 ▲0.2287.34 ▼20.14
Media Library /wp-admin/upload.php3.37 ▲0.1439.12 ▼0.22
Block Areas /wp-admin/edit.php?post_type=block_area3.4641.22

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 116 new files
Database: no new tables, 7 new options
New WordPress options
default_block_areas_version
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Block Areas
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.091.74 ▼0.3242.85 ▼0.85
Dashboard /wp-admin2,199 ▲225.50 ▼0.0488.44 ▼18.5840.90 ▼2.11
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0536.81 ▼0.9932.84 ▼2.72
Add New Post /wp-admin/post-new.php1,534 ▲623.11 ▼0.08659.33 ▲50.5564.32 ▲12.88
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.06103.60 ▲1.4546.82 ▲1.37
Block Areas /wp-admin/edit.php?post_type=block_area1,6932.0135.0533.78

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • default_block_areas_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 94× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installer\\LibraryInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/Installer.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/block-areas/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php:4

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: gutenberg, theming, blocks, editor, wprig

block-areas/block-areas.php Passed 13 tests

Analyzing the main PHP file in "Block Areas" version 0.2.0
104 characters long description:
Introduces a simple method for defining block areas to use the block editor outside of the post content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,788 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
PHP1074618722,527
JSON200233
XML11028

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity2.60
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes101
▷ Abstract classes10.99%
▷ Concrete classes10099.01%
▷ Final classes00.00%
Methods126
▷ Static methods53.97%
▷ Public methods8265.08%
▷ Protected methods3124.60%
▷ Private methods1310.32%
Functions21
▷ Named functions733.33%
▷ Anonymous functions1466.67%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
No PNG images were found in this plugin