84% random-blocks

Code Review | Random Blocks

WordPress plugin Random Blocks scored84%from 54 tests.

About plugin

  • Plugin page: random-blocks
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0+
  • WordPress version: 6.3.1
  • First release: Nov 21, 2018
  • Latest release: Nov 21, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: georgestephanis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /796 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.45ms] Passed 4 tests

This is a short check of server-side resources used by Random Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0334.64 ▼4.50
Dashboard /wp-admin3.32 ▲0.0144.28 ▼4.61
Posts /wp-admin/edit.php3.37 ▲0.0145.31 ▼4.45
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.67 ▼12.23
Media Library /wp-admin/upload.php3.24 ▲0.0136.01 ▼2.34

Server storage [IO: ▲0.71MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Random Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11613.41 ▼0.789.37 ▲7.5941.65 ▼2.34
Dashboard /wp-admin2,198 ▲215.63 ▲0.0685.80 ▼10.9937.88 ▼1.93
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0236.82 ▼1.6632.25 ▼7.31
Add New Post /wp-admin/post-new.php6,213 ▲4,68519.63 ▼3.26905.26 ▲276.4435.00 ▼45.51
Media Library /wp-admin/upload.php1,403 ▲34.25 ▲0.1098.76 ▼14.8442.93 ▼5.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/random-blocks/random-blocks.php:16

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: editor, gutenberg, blocks

random-blocks/random-blocks.php Passed 13 tests

This is the main PHP file of "Random Blocks" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
59 characters long description:
Some random blocks for the new WordPress Block-based Editor

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected882 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5205387
JSX65951298
PHP13214160
Sass35034
CSS3003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin