84% patternswp

Code Review | PatternsWP - WordPress Block Patterns Library

WordPress plugin PatternsWP - WordPress Block Patterns Library scored84%from 54 tests.

About plugin

  • Plugin page: patternswp
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2023
  • Latest release: Jun 10, 2023
  • Number of updates: 10
  • Update frequency: every 6.5 days
  • Top authors: patternswpteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /554 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.68MB] [CPU: ▼8.02ms] Passed 4 tests

A check of server-side resources used by PatternsWP - WordPress Block Patterns Library
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.17 ▲0.7139.58 ▼1.26
Dashboard /wp-admin4.00 ▲0.6545.79 ▼12.67
Posts /wp-admin/edit.php4.05 ▲0.6946.31 ▼1.27
Add New Post /wp-admin/post-new.php6.58 ▲0.6981.17 ▼16.86
Media Library /wp-admin/upload.php3.92 ▲0.6937.92 ▲4.35

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

PatternsWP - WordPress Block Patterns Library: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.37 ▼1.121.70 ▼0.0738.94 ▼4.70
Dashboard /wp-admin2,206 ▲214.87 ▼0.95105.92 ▲1.6839.56 ▼2.06
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0434.73 ▼6.9532.70 ▼4.65
Add New Post /wp-admin/post-new.php1,533 ▼318.66 ▼4.71630.68 ▲34.7554.29 ▲0.98
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0097.53 ▼4.5643.10 ▲0.82

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_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/patternswp/patterns/patternswp-customer.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/patternswp/patterns/patternswp-team.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/patternswp/patterns/patternswp-hero.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/patternswp/patterns/patternswp-gallery.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/patternswp/patterns/patternswp-pricing.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_block_pattern_category() in wp-content/plugins/patternswp/inc/register-block-categories.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/patternswp/patterns/patternswp-faq.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/patternswp/patterns/patternswp-features.php:115
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/patternswp/inc/register-block-patterns.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/patternswp/patterns/patternswp-testimonials.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

patternswp/patternswp.php Passed 13 tests

The main file in "PatternsWP - WordPress Block Patterns Library" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
93 characters long description:
A growing library of ready-made block patterns can help you build websites faster in no time.

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
Good job! No executable or dangerous file extensions detected582 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP14112201578
SVG1004

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.13
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin