83% disable-core-block-patterns

Code Review | Disable Core Block Patterns

WordPress plugin Disable Core Block Patterns scored83%from 54 tests.

About plugin

  • Plugin page: disable-core-bloc...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 24, 2020
  • Latest release: Oct 27, 2020
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: BjornW (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /766 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.53ms] Passed 4 tests

Analyzing server-side resources used by Disable Core Block Patterns
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.82 ▼3.71
Dashboard /wp-admin3.31 ▲0.0049.16 ▼0.87
Posts /wp-admin/edit.php3.36 ▲0.0054.29 ▼1.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.46 ▼7.59
Media Library /wp-admin/upload.php3.23 ▲0.0038.21 ▼1.64

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Core Block Patterns
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.74 ▲0.342.19 ▲0.3544.78 ▲0.53
Dashboard /wp-admin2,198 ▲215.56 ▲0.0090.73 ▼2.5342.32 ▼0.82
Posts /wp-admin/edit.php2,097 ▼62.02 ▲0.0839.85 ▲4.9638.63 ▲4.70
Add New Post /wp-admin/post-new.php1,526 ▼223.40 ▲0.34664.61 ▼26.0265.41 ▼6.93
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.03114.10 ▲6.1947.38 ▼0.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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/disable-core-block-patterns/disable-core-block-patterns.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Requires at least: Version not formatted correctly
  • Screenshots: These screenshots require images: #1 (After pressing the Plus (+) sign to select a new block or pattern to use in the Block (Gutenberg) editor.), #2 (Selecting the Block Patterns tab which is displaying Core Block Patterns only.), #3 (After activation of Disable Core Block Patterns, the patterns tab is gone. Note: if there are any _non_ Core Block Patterns, the tab is shown including your patterns (excluding Core Block Patterns).)
You can look at the official readme.txt

disable-core-block-patterns/disable-core-block-patterns.php 85% from 13 tests

The entry point to "Disable Core Block Patterns" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin17 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP152317

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
3 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png76.41KB22.83KB▼ 70.12%
screenshot-3.png22.57KB9.06KB▼ 59.86%
screenshot-1.png24.30KB10.22KB▼ 57.93%