84% zior-block-elements

Code Review | ZIOR Block Elements

WordPress plugin ZIOR Block Elements scored84%from 54 tests.

About plugin

  • Plugin page: zior-block-elements
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2022
  • Latest release: Feb 4, 2023
  • Number of updates: 8
  • Update frequency: every 7.4 days
  • Top authors: reygcalantaol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.74ms] Passed 4 tests

An overview of server-side resources used by ZIOR Block Elements
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.32 ▲3.86
Dashboard /wp-admin3.37 ▲0.0349.41 ▼13.79
Posts /wp-admin/edit.php3.49 ▲0.1348.03 ▼0.70
Add New Post /wp-admin/post-new.php5.96 ▲0.0887.88 ▲0.31
Media Library /wp-admin/upload.php3.29 ▲0.0737.18 ▼0.78

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for ZIOR Block Elements
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4313.89 ▼0.481.57 ▼0.3240.68 ▼1.59
Dashboard /wp-admin2,195 ▲145.55 ▼0.1784.08 ▼26.1637.23 ▼0.20
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0437.04 ▲1.3029.88 ▼5.31
Add New Post /wp-admin/post-new.php1,534 ▲523.05 ▲0.11597.56 ▼27.4896.14 ▲33.67
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.0895.23 ▼9.4542.73 ▼0.75

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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 everything seems fine, this is not 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/zior-block-elements/zr-blocks.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zior-block-elements/includes/routes.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: acf blocks, acf support

zior-block-elements/zr-blocks.php 85% from 13 tests

"ZIOR Block Elements" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("zior-block-elements.php" instead of "zr-blocks.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin370 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP894110368
CSS1001
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods2877.78%
▷ Protected methods616.67%
▷ Private methods25.56%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin