83% wpblocks

Code Review | WPBlocks

WordPress plugin WPBlocks scored83%from 54 tests.

About plugin

  • Plugin page: wpblocks
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.2
  • WordPress version: 6.3.1
  • First release: Jan 25, 2018
  • Latest release: Jan 25, 2018
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: hzlateska (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /783 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.11ms] Passed 4 tests

Server-side resources used by WPBlocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.88 ▼4.00
Dashboard /wp-admin3.38 ▲0.0451.89 ▼15.19
Posts /wp-admin/edit.php3.50 ▲0.1455.27 ▲1.83
Add New Post /wp-admin/post-new.php5.97 ▲0.0891.26 ▼11.06
Media Library /wp-admin/upload.php3.30 ▲0.0842.49 ▲5.65
WPBlocks /wp-admin/options-general.php?page=wpblocks-settings3.2730.41

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
wpblocks_settings
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WPBlocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.23 ▲0.072.89 ▲0.8439.62 ▼4.20
Dashboard /wp-admin2,199 ▲195.57 ▼0.0385.25 ▼10.2540.18 ▼0.20
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0139.30 ▲0.6335.20 ▼1.09
Add New Post /wp-admin/post-new.php1,546 ▲2023.10 ▼0.54684.13 ▲5.0736.78 ▼19.12
Media Library /wp-admin/upload.php1,401 ▲14.09 ▼0.08110.49 ▼7.3245.32 ▼4.44
WPBlocks /wp-admin/options-general.php?page=wpblocks-settings8492.0325.6727.25

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
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpblocks/inc/class-settings.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpblocks_settings() in wp-content/plugins/wpblocks/blocks/empty-space/index.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpblocks_settings() in wp-content/plugins/wpblocks/blocks/social-icons/index.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpblocks_settings() in wp-content/plugins/wpblocks/blocks/infobox/index.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please a description for screenshot #5 in wpblocks/assets to your readme.txt
The official readme.txt might help

wpblocks/wpblocks.php 85% from 13 tests

The entry point to "WPBlocks" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin411 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP7142319371
PO File1111334
CSS3003
JavaScript3003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.60
▷ Minimum class complexity2.00
▷ Maximum class complexity27.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods27
▷ Static methods13.70%
▷ Public methods2177.78%
▷ Protected methods00.00%
▷ Private methods622.22%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected