84% which-blocks

Code Review | Which Blocks

WordPress plugin Which Blocks scored 84% from 54 tests.

About plugin

  • Plugin page: which-blocks
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Feb 9, 2023
  • Latest release: Mar 30, 2023
  • Number of updates: 3
  • Update frequency: every 16.3 days
  • Top authors: cadic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.30ms] Passed 4 tests

An overview of server-side resources used by Which Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.07 ▼2.97
Dashboard /wp-admin3.35 ▲0.0443.40 ▼10.67
Posts /wp-admin/edit.php3.46 ▲0.1046.62 ▲0.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.40 ▲1.03
Media Library /wp-admin/upload.php3.27 ▲0.0436.67 ▼4.04
Which Blocks /wp-admin/tools.php?page=which-blocks3.3542.19

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

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

Browser metrics Passed 4 tests

Which Blocks: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.29 ▼1.084.97 ▲2.7743.44 ▼0.06
Dashboard /wp-admin2,207 ▲194.86 ▼0.04115.15 ▼1.3138.95 ▼11.38
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0339.25 ▲2.4835.86 ▲0.48
Add New Post /wp-admin/post-new.php1,536 ▲1623.17 ▲0.14652.84 ▼19.8150.35 ▼3.91
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0396.60 ▼12.0940.53 ▼5.51
Which Blocks /wp-admin/tools.php?page=which-blocks8192.0323.8026.11

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

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

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/which-blocks/which-blocks.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/which-blocks/which-blocks.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/which-blocks/src/class-blocks-list-table.php:16
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/screen.php): failed to open stream: No such file or directory in wp-content/plugins/which-blocks/which-blocks.php on line 19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
4 plugin tags: blocks usage, statistics, block, block editor

which-blocks/which-blocks.php 92% from 13 tests

The main file in "Which Blocks" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin290 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP556138178
Markdown5620112

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.75
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods535.71%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.79MB with 0.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-1544x500.png463.14KB143.03KB▼ 69.12%
.wordpress-org/screenshot-1.png63.57KB19.51KB▼ 69.31%
.wordpress-org/icon-256x256.png107.95KB29.34KB▼ 72.82%
.wordpress-org/banner-772x250.png141.82KB43.52KB▼ 69.32%
.wordpress-org/icon-128x128.png32.42KB9.91KB▼ 69.42%