84% post-format-block

Code Review | Post Format Block

WordPress plugin Post Format Block scored84%from 54 tests.

About plugin

  • Plugin page: post-format-block
  • Plugin version: 0.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-alpha-5.9.0
  • WordPress version: 6.3.1
  • First release: Nov 3, 2021
  • Latest release: Nov 3, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: jorbin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /839 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.96ms] Passed 4 tests

An overview of server-side resources used by Post Format Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0248.16 ▼1.24
Dashboard /wp-admin3.32 ▲0.0250.88 ▲0.98
Posts /wp-admin/edit.php3.37 ▲0.0148.76 ▼6.23
Add New Post /wp-admin/post-new.php5.94 ▲0.06110.54 ▲24.18
Media Library /wp-admin/upload.php3.24 ▲0.0139.73 ▲2.65

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Format Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.36 ▲0.011.65 ▼0.1843.68 ▼3.84
Dashboard /wp-admin2,195 ▲185.63 ▼0.0391.00 ▲0.6741.03 ▼0.29
Posts /wp-admin/edit.php2,103 ▲31.98 ▲0.0133.85 ▼6.5929.80 ▼6.72
Add New Post /wp-admin/post-new.php1,532 ▼523.50 ▲5.12663.93 ▲27.9154.63 ▼19.06
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.10111.53 ▲5.5451.55 ▲3.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-format-block/post-format-block.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: post formats, fse, block

post-format-block/post-format-block.php 92% from 13 tests

This is the main PHP file of "Post Format Block" version 0.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "5.9-alpha")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin16,406 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JSON30016,379
JavaScript24414
PHP232113

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected