84% patterns

Code Review | WordPress Block Patterns Plugin

WordPress plugin WordPress Block Patterns Plugin scored84%from 54 tests.

About plugin

  • Plugin page: patterns
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2020
  • Latest release: Sep 17, 2020
  • Number of updates: 19
  • Update frequency: every 0.1 days
  • Top authors: mervinpraison (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /693 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by WordPress Block Patterns Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.77 ▼1.28
Dashboard /wp-admin3.31 ▲0.0148.48 ▼2.71
Posts /wp-admin/edit.php3.36 ▲0.0045.90 ▲0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.82 ▼8.43
Media Library /wp-admin/upload.php3.23 ▲0.0035.74 ▲4.00

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Block Patterns Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼1.231.77 ▼0.1845.53 ▼3.87
Dashboard /wp-admin2,209 ▲215.89 ▲1.01101.23 ▼6.3838.60 ▼3.70
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0434.25 ▼3.3131.20 ▼4.72
Add New Post /wp-admin/post-new.php1,514 ▼017.73 ▲0.20641.19 ▼29.9253.73 ▲0.48
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0594.43 ▼7.4942.90 ▲0.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 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/patterns/index.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3 in patterns/assets to your readme.txt
You can take inspiration from this readme.txt

patterns/index.php 92% from 13 tests

The main PHP file in "WordPress Block Patterns Plugin" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("patterns.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin99 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
Markdown125069
PHP152430

PHP code Passed 2 tests

An short overview of 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.25
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%
Functions1
▷ Named functions1100.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