72% elegant-blocks

Code Review | Elegant Blocks - Amazing Gutenberg Blocks

WordPress plugin Elegant Blocks - Amazing Gutenberg Blocks scored72%from 54 tests.

About plugin

  • Plugin page: elegant-blocks
  • Plugin version: 1.7
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.3
  • WordPress version: 6.3.1
  • First release: Dec 29, 2018
  • Latest release: Mar 23, 2021
  • Number of updates: 50
  • Update frequency: every 16.3 days
  • Top authors: cyclonetheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /27,088 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.05MB] [CPU: ▼0.82ms] Passed 4 tests

Server-side resources used by Elegant Blocks - Amazing Gutenberg Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2944.00 ▲7.80
Dashboard /wp-admin5.29 ▲1.9868.73 ▲12.73
Posts /wp-admin/edit.php5.42 ▲2.0676.93 ▲22.81
Add New Post /wp-admin/post-new.php5.76 ▼0.1254.93 ▼46.62
Media Library /wp-admin/upload.php5.36 ▲2.1365.95 ▲35.65
Testimonials /wp-admin/edit.php?post_type=ct_testimonials5.4057.98
Teams /wp-admin/edit.php?post_type=ct_teams5.4058.67
Add New /wp-admin/post-new.php?post_type=cp_services5.7553.03
Add New /wp-admin/post-new.php?post_type=ct_testimonials5.7556.42
Services /wp-admin/edit.php?post_type=cp_services5.4062.76
Categories /wp-admin/edit-tags.php?taxonomy=ct_team_category&post_type=ct_teams5.2956.61
Sliders /wp-admin/edit.php?post_type=ct_slider5.4058.83
Add New /wp-admin/post-new.php?post_type=ct_gallery5.7557.31
Add New /wp-admin/post-new.php?post_type=eb_clients5.7651.99
Add New /wp-admin/post-new.php?post_type=ct_slider5.7552.33

Server storage [IO: ▲26.20MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Try to limit filesystem usage to 25MB (currently using 26.20MB)
Filesystem: 307 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics 75% from 4 tests

This is an overview of browser requirements for Elegant Blocks - Amazing Gutenberg Blocks
Having an awesome user experience is important, so please improve the following
  • Nodes: It is recommended to reduce the number of DOM nodes under 25,000 (currently 52,026 on /wp-admin/post-new.php?post_type=cp_services)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,229 ▲49415.99 ▲1.2040.57 ▲38.8088.64 ▲38.59
Dashboard /wp-admin2,442 ▲2515.93 ▲1.02113.49 ▲7.5239.60 ▼5.54
Posts /wp-admin/edit.php2,325 ▲2362.79 ▲0.8239.10 ▼1.9836.92 ▼0.19
Add New Post /wp-admin/post-new.php47,304 ▲45,79022.43 ▲4.60838.35 ▲183.59871.38 ▲815.65
Media Library /wp-admin/upload.php1,624 ▲2365.35 ▲1.13103.54 ▼8.8344.70 ▼0.10
Testimonials /wp-admin/edit.php?post_type=ct_testimonials1,3062.7739.0827.93
Teams /wp-admin/edit.php?post_type=ct_teams1,2942.8439.3729.01
Add New /wp-admin/post-new.php?post_type=cp_services52,02624.441,019.45695.19
Add New /wp-admin/post-new.php?post_type=ct_testimonials6,51622.34786.7338.25
Services /wp-admin/edit.php?post_type=cp_services1,2942.8436.4628.82
Categories /wp-admin/edit-tags.php?taxonomy=ct_team_category&post_type=ct_teams1,4982.9035.3429.26
Sliders /wp-admin/edit.php?post_type=ct_slider1,2942.7437.9629.22
Add New /wp-admin/post-new.php?post_type=ct_gallery6,39222.99762.6230.09
Add New /wp-admin/post-new.php?post_type=eb_clients1,72019.06758.5232.90
Add New /wp-admin/post-new.php?post_type=ct_slider6,43822.52789.7535.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ct_slider
    • > User deprecated in wp-includes/functions.php+5828
    Hook block_categories is deprecated since version 5.8.0! Use block_categories_all instead.

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
The following issues need your attention
  • 36× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elegant-blocks/theme/green-eco-planet/functions.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elegant-blocks/theme/green-eco-planet/demo/demo.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elegant-blocks/theme/pizza-hub/theme-option.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elegant-blocks/src/inc/meta_box.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elegant-blocks/theme/dr-life-saver/demo-pro/demo.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elegant-blocks/theme/bizberg/theme-option.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elegant-blocks/theme/education-business/theme-option.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elegant-blocks/theme/professional-education-consultancy/demo-pro/demo.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elegant-blocks/src/inc/post_types.php:209
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elegant-blocks/theme/education-business/demo/demo.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ct_slider
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?libraries=places&key&ver=1 234:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 96% 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
7 plugin tags: blocks, gutenberg blocks, block, gutenberg, editor...

elegant-blocks/plugin.php 92% from 13 tests

The primary PHP file in "Elegant Blocks - Amazing Gutenberg Blocks" version 1.7 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("elegant-blocks.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected160,067 lines of code in 137 files:
LanguageFilesBlank linesComment linesLines of code
XML132,6063,58767,903
SVG501632,827
PHP643,9511,54919,147
JSON20019,052
CSS123,60044815,339
JavaScript123061912,262
Sass1535351,779
LESS1434441,758

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions291
▷ Named functions29099.66%
▷ Anonymous functions10.34%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
55 PNG files occupy 0.70MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/images/shape_divider/7.png18.83KB6.85KB▼ 63.59%
src/images/map_icons/12.png2.08KB1.82KB▼ 12.22%
src/images/map_icons/16.png1.43KB1.14KB▼ 20.12%
src/images/shape_divider/13.png12.04KB7.33KB▼ 39.12%
src/images/shape_divider/16.png34.28KB22.86KB▼ 33.32%