83% block-editor-for-product

Code Review | Block Editor for Product

WordPress plugin Block Editor for Product scored 83% from 54 tests.

About plugin

  • Plugin page: block-editor-for-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6 or later+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Sep 24, 2022
  • Latest release: Aug 13, 2023
  • Number of updates: 4
  • Update frequency: every 81.0 days
  • Top authors: khokansardar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 279 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
Installer ran successfully

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

A check of server-side resources used by Block Editor for Product
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.41 ▼4.00
Dashboard /wp-admin3.31 ▲0.0044.08 ▼2.14
Posts /wp-admin/edit.php3.36 ▲0.0043.74 ▼0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.02 ▼0.69
Media Library /wp-admin/upload.php3.23 ▲0.0035.10 ▲1.13

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Block Editor for Product
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.18 ▼1.631.71 ▼0.1041.87 ▼2.57
Dashboard /wp-admin2,203 ▼05.78 ▲0.0195.36 ▲0.0936.10 ▼0.47
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0438.80 ▲4.5435.13 ▲2.26
Add New Post /wp-admin/post-new.php1,533 ▲15323.31 ▲4.41669.38 ▲119.1859.84 ▲8.07
Media Library /wp-admin/upload.php1,388 ▼04.26 ▲0.0896.53 ▼3.6242.11 ▼7.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/block-editor-for-product/block-editor-for-product.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: enable gutenberg, block editor product, gutenberg, enable gutenberg product, product

block-editor-for-product/block-editor-for-product.php 77% from 13 tests

"Block Editor for Product" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires PHP: Required version number formatted incorrectly (ex. "7.0" instead of "5.6 or later")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected26 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122926

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods375.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin