89% blocks-for-wp-editor

Code Review | Blocks for WP Editor

WordPress plugin Blocks for WP Editor scored89%from 54 tests.

About plugin

  • Plugin page: blocks-for-wp-editor
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8.1
  • WordPress version: 6.3.1
  • First release: Jun 17, 2021
  • Latest release: Jul 29, 2023
  • Number of updates: 8
  • Update frequency: every 96.9 days
  • Top authors: shubanstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /388 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▲2.82ms] Passed 4 tests

An overview of server-side resources used by Blocks for WP Editor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.69 ▲2.70
Dashboard /wp-admin3.39 ▲0.0950.68 ▼0.40
Posts /wp-admin/edit.php3.49 ▲0.1351.81 ▲6.73
Add New Post /wp-admin/post-new.php5.97 ▲0.0996.18 ▲9.78
Media Library /wp-admin/upload.php3.32 ▲0.0936.61 ▲2.26

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Blocks for WP Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,034 ▲29919.98 ▲5.781.85 ▼0.1045.06 ▼9.20
Dashboard /wp-admin2,442 ▲25411.19 ▲6.30260.98 ▲146.3543.90 ▼3.30
Posts /wp-admin/edit.php2,327 ▲2419.73 ▲7.5795.71 ▲57.0236.22 ▲0.51
Add New Post /wp-admin/post-new.php6,429 ▲4,90820.30 ▼2.94878.35 ▲193.2238.41 ▼10.52
Media Library /wp-admin/upload.php1,755 ▲36711.69 ▲7.40164.71 ▲57.2549.14 ▲6.74

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

blocks-for-wp-editor/init.php 77% from 13 tests

Analyzing the main PHP file in "Blocks for WP Editor" version 1.0.0
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("blocks-for-wp-editor.php" instead of "init.php")
  • 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 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected439 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP7130208329
JSON140107
CSS2002
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.68
Average class complexity9.20
▷ Minimum class complexity2.00
▷ Maximum class complexity36.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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