84% cloud-blocks

Code Review | Cloud Blocks

WordPress plugin Cloud Blocks scored84%from 54 tests.

About plugin

  • Plugin page: cloud-blocks
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.2
  • WordPress version: 6.3.1
  • First release: Oct 18, 2018
  • Latest release: Oct 10, 2019
  • Number of updates: 38
  • Update frequency: every 9.6 days
  • Top authors: frontkom (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /6,746 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.32MB] [CPU: ▼3.30ms] Passed 4 tests

A check of server-side resources used by Cloud Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2946.21 ▲2.80
Dashboard /wp-admin3.69 ▲0.3559.83 ▼5.53
Posts /wp-admin/edit.php3.74 ▲0.3953.24 ▲0.78
Add New Post /wp-admin/post-new.php6.21 ▲0.3292.72 ▼10.60
Media Library /wp-admin/upload.php3.55 ▲0.3241.62 ▲2.15
Tools /wp-admin/admin.php?page=gutenberg-cloud-tools3.5538.42
Cloud Blocks 0 /wp-admin/admin.php?page=cloud-blocks3.5440.05

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 63 new files
Database: 1 new table, 7 new options
New tables
wp_cloud_blocks
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
gutenberg_cloud_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Cloud Blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.26 ▼0.351.77 ▼0.2143.29 ▼1.24
Dashboard /wp-admin2,223 ▲495.51 ▼0.1589.63 ▼13.2238.29 ▼3.56
Posts /wp-admin/edit.php2,134 ▲311.98 ▼0.0534.22 ▼1.8433.69 ▼2.06
Add New Post /wp-admin/post-new.php1,556 ▲3023.25 ▲0.11670.34 ▼16.7551.57 ▼3.06
Media Library /wp-admin/upload.php1,425 ▲224.19 ▼0.01101.06 ▼4.2842.81 ▼4.44
Tools /wp-admin/admin.php?page=gutenberg-cloud-tools9472.3136.6131.85
Cloud Blocks 0 /wp-admin/admin.php?page=cloud-blocks1,5502.9555.5833.53

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'SevenFields\\Fields\\Fields' not found in wp-content/plugins/cloud-blocks/vendor/foadyousefi/seven-fields/src/Fields/Textarea.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SevenFields\\Fields\\Fields' not found in wp-content/plugins/cloud-blocks/vendor/foadyousefi/seven-fields/src/Fields/Text.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SevenFields\\Fields\\Fields' not found in wp-content/plugins/cloud-blocks/vendor/foadyousefi/seven-fields/src/Fields/Html.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SevenFields\\Fields\\Fields' not found in wp-content/plugins/cloud-blocks/vendor/foadyousefi/seven-fields/src/Fields/Checkbox.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SevenFields\\Fields\\Fields' not found in wp-content/plugins/cloud-blocks/vendor/foadyousefi/seven-fields/src/Fields/Multiselect.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SevenFields\\Fields\\Fields' not found in wp-content/plugins/cloud-blocks/vendor/foadyousefi/seven-fields/src/Fields/Header.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cloud-blocks/vendor/foadyousefi/seven-fields/config.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'SevenFields\\Fields\\Fields' not found in wp-content/plugins/cloud-blocks/vendor/foadyousefi/seven-fields/src/Fields/Select.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: gutenberg blocks, pagebuilder, blocks, gutenberg, page builder

cloud-blocks/cloud-blocks.php Passed 13 tests

The main PHP file in "Cloud Blocks" ver. 1.1.8 adds more information about the plugin and also serves as the entry point for this plugin
45 characters long description:
Your library of Gutenberg blocks in the cloud

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin4,941 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP273779581,692
JavaScript75721,653
PO File5301312797
Markdown71690359
CSS3290235
Sass1210111
JSON30094

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.71
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods109
▷ Static methods5146.79%
▷ Public methods10798.17%
▷ Protected methods00.00%
▷ Private methods21.83%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.04MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/thumbnail.png36.94KB38.34KB0.00%