10% advanced-custom-blocks

Code Review | Advanced Custom Blocks

WordPress plugin Advanced Custom Blocks scored10%from 54 tests.

About plugin

  • Plugin page: advanced-custom-b...
  • Plugin version: 0.1
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9
  • WordPress version: 6.3.1
  • First release: Aug 3, 2018
  • Latest release: Nov 14, 2018
  • Number of updates: 8
  • Update frequency: every 12.8 days
  • Top authors: rheinardkorf (75%)lukecarbis (37.5%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,318 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/advanced-custom-blocks/advanced-custom-blocks.php+95
    Uncaught Error: Class 'AdvancedCustomBlocks\View\Admin_Menu' not found in wp-content/plugins/advanced-custom-blocks/advanced-custom-blocks.php:95
    Stack trace:
    #0 wp-admin/includes/plugin.php(2318): include_once()
    #1 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▼0.01MB] [CPU: ▼3.81ms] Passed 4 tests

An overview of server-side resources used by Advanced Custom Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.18 ▼5.51
Dashboard /wp-admin3.31 ▼0.0455.03 ▼9.04
Posts /wp-admin/edit.php3.36 ▲0.0054.69 ▲4.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.97 ▼4.35
Media Library /wp-admin/upload.php3.23 ▲0.0036.92 ▲3.66

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.74 ▲0.391.71 ▲0.1640.69 ▲2.25
Dashboard /wp-admin2,198 ▲245.57 ▼0.0992.61 ▼6.2341.71 ▼4.28
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0338.76 ▼1.5635.88 ▼4.00
Add New Post /wp-admin/post-new.php1,526 ▼222.95 ▼0.33653.26 ▲28.0056.88 ▼3.52
Media Library /wp-admin/upload.php1,400 ▲34.21 ▲0.0194.72 ▼16.0740.98 ▼4.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\ComponentAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/blocks/class-loader.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\PluginAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/class-plugin.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\ComponentAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/view/class-admin-menu.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\ComponentAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/posttypes/class-block-post-type.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'AdvancedCustomBlocks\\ComponentInterface' not found in wp-content/plugins/advanced-custom-blocks/php/class-componentabstract.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\ComponentAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/endpoints/class-preview.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'AdvancedCustomBlocks\\PluginInterface' not found in wp-content/plugins/advanced-custom-blocks/php/class-pluginabstract.php:15

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: gutenberg, blocks

advanced-custom-blocks/advanced-custom-blocks.php 85% from 13 tests

"Advanced Custom Blocks" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: The domain path should use 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
Everything looks great! No dangerous files found in this plugin1,295 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP14249732972
CSS200132
Markdown175096
JavaScript39087
SVG1008

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.82
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces5
Interfaces2
Traits0
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods64
▷ Static methods00.00%
▷ Public methods64100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There were not PNG files found in your plugin