84% ultimate-addons-for-gutenberg

Code Review | Spectra - WordPress Gutenberg Blocks

WordPress plugin Spectra - WordPress Gutenberg Blocks scored84%from 54 tests.

About plugin

  • Plugin page: ultimate-addons-f...
  • Plugin version: 2.10.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2018
  • Latest release: Dec 2, 2023
  • Number of updates: 170
  • Update frequency: every 11.8 days
  • Top authors: brainstormworg (69.41%)vrundakansara (15.88%)Nikschavan (14.71%)patilvikasj (1.76%)

Code review

54 tests

User reviews

997 reviews

Install metrics

600,000+ active /16,932,207 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲4.34MB] [CPU: ▲35.26ms] 75% from 4 tests

A check of server-side resources used by Spectra - WordPress Gutenberg Blocks
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 843.00ms on /wp-admin/admin.php?page=spectra&path=settings)
PageMemory (MB)CPU Time (ms)
Home /7.49 ▲4.0273.69 ▲35.89
Dashboard /wp-admin7.74 ▲4.4375.08 ▲27.02
Posts /wp-admin/edit.php7.79 ▲4.4383.73 ▲34.87
Add New Post /wp-admin/post-new.php21.51 ▲15.62466.95 ▲366.47
Media Library /wp-admin/upload.php7.69 ▲4.4576.80 ▲43.25
Settings /wp-admin/admin.php?page=spectra&path=settings8.54843.00
AI Features /wp-admin/admin.php?page=spectra&path=ai-features8.12121.02
Dashboard /wp-admin/admin.php?page=spectra8.12137.42
Blocks /wp-admin/admin.php?page=spectra&path=blocks8.12139.46
Popup Builder /wp-admin/edit.php?post_type=spectra-popup7.7364.55

Server storage [IO: ▲15.08MB] [DB: ▲1.21MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 548 new files
Database: no new tables, 19 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
uag_enable_dynamic_content
widget_theysaidso_widget
widget_recent-comments
_uagb_allow_file_generation
uag_enable_animations_extension
uagb-version
__uagb_asset_version
...

Browser metrics Passed 4 tests

Spectra - WordPress Gutenberg Blocks: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲8614.20 ▼0.511.92 ▲0.0741.95 ▲4.58
Dashboard /wp-admin2,254 ▲775.64 ▲0.0397.53 ▲4.9941.82 ▼0.89
Posts /wp-admin/edit.php2,162 ▲622.00 ▼0.0340.94 ▲2.8335.62 ▼0.67
Add New Post /wp-admin/post-new.php3,049 ▲1,52338.10 ▲14.961,192.08 ▲599.1678.31 ▲25.71
Media Library /wp-admin/upload.php1,461 ▲614.12 ▼0.08108.12 ▲9.2844.42 ▲1.09
Settings /wp-admin/admin.php?page=spectra&path=settings1,1994.3486.8898.70
AI Features /wp-admin/admin.php?page=spectra&path=ai-features1,1924.1987.3345.88
Dashboard /wp-admin/admin.php?page=spectra1,60411.35332.3787.43
Blocks /wp-admin/admin.php?page=spectra&path=blocks1,7285.1769.0062.44
Popup Builder /wp-admin/edit.php?post_type=spectra-popup1,1281.9032.2630.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 19 options
    • uag_enable_block_condition
    • theysaidso_admin_options
    • widget_recent-comments
    • uagb_site_url
    • widget_theysaidso_widget
    • can_compress_scripts
    • _uagb_allow_file_generation
    • __uagb_asset_version
    • uag_enable_dynamic_content
    • uag_enable_animations_extension
    • ...

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 345× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/taxonomy-list/block.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'UAGB_Block_JS' not found in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/post-carousel/frontend.css.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/post-timeline/block.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'UAGB_Block_JS' not found in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/separator/frontend.css.php:12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/table-of-contents/frontend.js.php on line 16
    • > PHP Notice
      Undefined variable: attr in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/social-share/frontend.css.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/slider-child/frontend.css.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/icon-list/attributes.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/post-button/block.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'UAGB_Block_Helper' not found in wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/cf7-styler/attributes.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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, blocks, block, gutenberg, editor

ultimate-addons-for-gutenberg/ultimate-addons-for-gutenberg.php Passed 13 tests

The main PHP file in "Spectra - WordPress Gutenberg Blocks" ver. 2.10.3 adds more information about the plugin and also serves as the entry point for this plugin
124 characters long description:
The Spectra extends the Gutenberg functionality with several unique and feature-rich blocks that help build websites faster.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected105,743 lines of code in 532 files:
LanguageFilesBlank linesComment linesLines of code
JSON130050,532
PHP2735,2948,94642,432
JavaScript956314506,325
CSS685573845,171
SVG78251,016
XML220141
Bourne Shell22311125
HTML1001

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity44.55
▷ Minimum class complexity1.00
▷ Maximum class complexity285.00
Average method complexity5.01
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes64
▷ Abstract classes23.12%
▷ Concrete classes6296.88%
▷ Final classes1117.74%
Methods680
▷ Static methods22232.65%
▷ Public methods64695.00%
▷ Protected methods50.74%
▷ Private methods294.26%
Functions29
▷ Named functions1758.62%
▷ Anonymous functions1241.38%
Constants44
▷ Global constants4397.73%
▷ Class constants12.27%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/gutenberg-templates/dist/placeholder.png50.74KB25.55KB▼ 49.64%
admin/assets/images/placeholder.png4.18KB2.05KB▼ 50.90%
lib/gutenberg-templates/dist/placeholder_200_200.png2.78KB2.55KB▼ 8.23%
admin/assets/images/uagb-10.png12.31KB12.17KB▼ 1.16%