84% enable-core-patterns

Code Review | Enable Core Patterns

WordPress plugin Enable Core Patterns scored84%from 54 tests.

About plugin

  • Plugin page: enable-core-patterns
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2022
  • Latest release: Mar 30, 2023
  • Number of updates: 3
  • Update frequency: every 126.3 days
  • Top authors: uxl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /356 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.00MB] [CPU: ▼1.64ms] Passed 4 tests

Analyzing server-side resources used by Enable Core Patterns
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.89 ▲3.44
Dashboard /wp-admin3.31 ▲0.0143.75 ▼1.35
Posts /wp-admin/edit.php3.36 ▲0.0047.12 ▼0.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.53 ▼6.71
Media Library /wp-admin/upload.php3.23 ▲0.0034.24 ▲2.32

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Enable Core Patterns
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.74 ▼0.824.40 ▲2.8141.24 ▲3.93
Dashboard /wp-admin2,206 ▲145.91 ▲0.99105.16 ▼8.2441.24 ▲0.23
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0340.04 ▼1.2234.94 ▼0.51
Add New Post /wp-admin/post-new.php1,533 ▼922.80 ▲4.54659.65 ▲21.6070.37 ▲17.40
Media Library /wp-admin/upload.php1,385 ▼34.25 ▲0.0794.18 ▼2.3443.33 ▲2.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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
Everything seems fine, however 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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enable-core-patterns/enable-core-patterns.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
5 plugin tags: blocks, theme, block, core, pattern

enable-core-patterns/enable-core-patterns.php 92% from 13 tests

"Enable Core Patterns" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 209 characters long)

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
Success! There were no dangerous files found in this plugin5 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11145

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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 images were found in this plugin