78% blockbuddy

Code Review | Blockbuddy

WordPress plugin Blockbuddy scored78%from 54 tests.

About plugin

  • Plugin page: blockbuddy
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.1.0
  • WordPress version: 6.3.1
  • First release: Feb 24, 2019
  • Latest release: Feb 24, 2019
  • Number of updates: 8
  • Update frequency: every 0.9 days
  • Top authors: aaronrutley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,186 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.65MB] [CPU: ▼22.19ms] Passed 4 tests

Analyzing server-side resources used by Blockbuddy
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.13 ▼5.72
Dashboard /wp-admin3.35 ▼0.0053.58 ▼9.60
Posts /wp-admin/edit.php3.46 ▲0.1051.41 ▲0.48
Add New Post /wp-admin/post-new.php3.22 ▼2.6738.77 ▼73.92
Media Library /wp-admin/upload.php3.27 ▲0.0437.19 ▲1.61

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Blockbuddy
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▼0.001.51 ▼0.1341.78 ▲1.29
Dashboard /wp-admin2,189 ▲125.56 ▼0.0584.15 ▼4.3340.90 ▼5.67
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0135.33 ▲0.5337.59 ▼2.60
Add New Post /wp-admin/post-new.php6,366 ▲4,83827.69 ▲4.54881.98 ▲191.0541.84 ▼12.89
Media Library /wp-admin/upload.php1,391 ▼124.18 ▼0.03101.42 ▼9.2644.39 ▼1.22

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/blockbuddy/trunk/templates/three-column.php
    • > /wp-content/plugins/blockbuddy/block-buddy.php
    • > /wp-content/plugins/blockbuddy/trunk/templates/four-column.php
    • > /wp-content/plugins/blockbuddy/templates/three-column.php
    • > /wp-content/plugins/blockbuddy/trunk/block-buddy.php
    • > /wp-content/plugins/blockbuddy/templates/four-column.php
    • > /wp-content/plugins/blockbuddy/templates/two-column.php
    • > /wp-content/plugins/blockbuddy/trunk/templates/two-column.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: post_query in wp-content/plugins/blockbuddy/templates/two-column.php on line 6
    • > PHP Notice
      Undefined variable: post_query in wp-content/plugins/blockbuddy/trunk/templates/three-column.php on line 6
    • > PHP Notice
      Undefined variable: post_query in wp-content/plugins/blockbuddy/trunk/templates/two-column.php on line 6
    • > PHP Notice
      Undefined variable: post_query in wp-content/plugins/blockbuddy/trunk/templates/four-column.php on line 6
    • > PHP Notice
      Undefined variable: post_query in wp-content/plugins/blockbuddy/templates/three-column.php on line 6
    • > PHP Notice
      Undefined variable: post_query in wp-content/plugins/blockbuddy/templates/four-column.php on line 6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: block, gutenberg

blockbuddy/block-buddy.php 92% from 13 tests

The primary PHP file in "Blockbuddy" version 0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("blockbuddy.php" instead of "block-buddy.php")

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
Success! There were no dangerous files found in this plugin622 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP810150337
JavaScript32224159
Sass3161101
JSON10023
CSS2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity11.50
▷ Minimum class complexity2.00
▷ Maximum class complexity21.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods3895.00%
▷ Public methods3690.00%
▷ Protected methods25.00%
▷ Private methods25.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG files were detected