73% blocksinform

Code Review | BlocksInform

WordPress plugin BlocksInform scored73%from 54 tests.

About plugin

  • Plugin page: blocksinform
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 2, 2023
  • Latest release: Feb 13, 2023
  • Number of updates: 8
  • Update frequency: every 1.5 days
  • Top authors: blocksinform (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /151 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.20ms] Passed 4 tests

Server-side resources used by BlocksInform
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.84 ▼3.70
Dashboard /wp-admin3.36 ▲0.0548.16 ▼2.03
Posts /wp-admin/edit.php3.47 ▲0.1147.93 ▲1.07
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.48 ▼12.15
Media Library /wp-admin/upload.php3.28 ▲0.0537.53 ▲1.47

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wp__blocksinform_settings
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for BlocksInform
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8014.74 ▲0.091.77 ▼0.1242.32 ▼4.69
Dashboard /wp-admin2,221 ▲364.94 ▼0.9193.81 ▼15.6972.87 ▲27.44
Posts /wp-admin/edit.php2,104 ▲151.97 ▼0.0835.12 ▲0.6532.40 ▼4.09
Add New Post /wp-admin/post-new.php1,680 ▲14722.37 ▼0.73712.83 ▲70.8460.74 ▼2.16
Media Library /wp-admin/upload.php1,397 ▲64.18 ▼0.0495.62 ▼2.7268.00 ▲24.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp__blocksinform_settings
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/blocksinform/widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/blocksinform/settings.php:90
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/blocksinform/widget.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (**Native Network**), #2 (**Traffic Exchange Service**), #3 (**Related Content Service**), #4 (**Key Features**), #5 (**BlocksInform's settings page**), #6 (**Widget Example**)
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
  • Requires at least: Version format is invalid
The official readme.txt might help

blocksinform/blocksinform_widget.php 92% from 13 tests

The primary PHP file in "BlocksInform" version 1.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("blocksinform.php" instead of "blocksinform_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin433 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP38246355
JavaScript420878

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity19.00
▷ Minimum class complexity7.00
▷ Maximum class complexity31.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants9
▷ Global constants9100.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
4 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/blocksinform.png159.86KB70.63KB▼ 55.82%
img/arrow_right_32.png4.12KB0.19KB▼ 95.30%
img/question-mark.png1.20KB0.29KB▼ 75.73%
img/blocksinform_icon.png1.39KB0.97KB▼ 29.72%