68% post-blocks

Code Review | Post Blocks

WordPress plugin Post Blocks scored68%from 54 tests.

About plugin

  • Plugin page: post-blocks
  • Plugin version: 0.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Sep 17, 2011
  • Latest release: Dec 29, 2017
  • Number of updates: 24
  • Update frequency: every 128.8 days
  • Top authors: avitar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,596 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼30.96ms] Passed 4 tests

This is a short check of server-side resources used by Post Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0733.87 ▼10.05
Dashboard /wp-admin3.06 ▼0.2924.67 ▼31.50
Posts /wp-admin/edit.php3.06 ▼0.3023.20 ▼23.25
Add New Post /wp-admin/post-new.php3.06 ▼2.8324.63 ▼56.13
Media Library /wp-admin/upload.php3.06 ▼0.1721.15 ▼12.96
Post Blocks /wp-admin/options-general.php?page=post-blocks/post-blocks.php3.0621.69

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.72 ▼0.671.63 ▼0.6742.86 ▼3.89
Dashboard /wp-admin2,210 ▲254.85 ▼1.00112.11 ▲8.4943.11 ▼1.34
Posts /wp-admin/edit.php2,096 ▲41.99 ▼0.0040.74 ▲2.3735.56 ▲0.05
Add New Post /wp-admin/post-new.php1,536 ▲2223.40 ▲5.87580.53 ▼129.1960.88 ▼2.81
Media Library /wp-admin/upload.php1,392 ▲14.21 ▼0.0495.21 ▼8.6641.72 ▼3.97
Post Blocks /wp-admin/options-general.php?page=post-blocks/post-blocks.php8862.0621.7129.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-blocks/post-blocks.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-blocks/post-blocks.php
    • > Notice in wp-content/plugins/post-blocks/post-blocks-settings.php+16
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-blocks/post-blocks.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-blocks/post-blocks-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-blocks/widget.php:127

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Screenshot Widget Display), #2 (Screenshot Widget Options), #3 (Screenshot Settings)
Please take inspiration from this readme.txt

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

The primary PHP file in "Post Blocks" version 0.0.6 is used by WordPress to initiate all plugin functionality
101 characters long description:
Extends the basic WordPress functionality to enable posts to be listed anywhere you can put a widget.

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
Good job! No executable or dangerous file extensions detected251 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31754251

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin