83% astra-sites

Code Review | Starter Templates — Elementor, WordPress & Beaver Builder Templates

WordPress plugin Starter Templates — Elementor, WordPress & Beaver Builder Templates scored83%from 54 tests.

About plugin

  • Plugin page: astra-sites
  • Plugin version: 3.4.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Jul 26, 2017
  • Latest release: Nov 17, 2023
  • Number of updates: 238
  • Update frequency: every 9.7 days
  • Top authors: brainstormworg (57.56%)Nikschavan (32.35%)vrundakansara (7.14%)patilvikasj (4.2%)

Code review

54 tests

User reviews

4336 reviews

Install metrics

1,000,000+ active /41,980,048 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.61MB] [CPU: ▲18.51ms] 75% from 4 tests

Analyzing server-side resources used by Starter Templates — Elementor, WordPress & Beaver Builder Templates
Please have a look at the following items
  • RAM: Try to keep total memory usage under 10MB (currently 25.13MB on /wp-admin/themes.php?page=starter-templates)
PageMemory (MB)CPU Time (ms)
Home /6.05 ▲2.5857.95 ▲16.20
Dashboard /wp-admin5.93 ▲2.5874.80 ▲15.34
Posts /wp-admin/edit.php6.02 ▲2.6667.18 ▲23.31
Add New Post /wp-admin/post-new.php12.22 ▲6.33530.39 ▲436.39
Media Library /wp-admin/upload.php5.85 ▲2.6251.16 ▲19.18
Starter Templates /wp-admin/themes.php?page=starter-templates25.13191.81

Server storage [IO: ▲7.76MB] [DB: ▲5.47MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 336 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Starter Templates — Elementor, WordPress & Beaver Builder Templates
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,991 ▲24414.35 ▼0.421.84 ▲0.0328.21 ▼16.73
Dashboard /wp-admin2,381 ▲2065.57 ▼0.1695.22 ▼18.92102.85 ▲57.58
Posts /wp-admin/edit.php2,146 ▲432.28 ▲0.2738.61 ▲0.3935.24 ▲0.38
Add New Post /wp-admin/post-new.php2,753 ▲1,22720.47 ▼0.61743.11 ▲71.2167.50 ▲19.08
Media Library /wp-admin/upload.php1,442 ▲484.34 ▲0.15107.06 ▲4.7542.50 ▼0.46
Starter Templates /wp-admin/themes.php?page=starter-templates1,17312.59224.0647.26

Uninstaller [IO: ▲0.00MB] [DB: ▲5.47MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 31× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ASTRA_SITES_DIRinc/classes/batch-import/class-astra-sites-batch-site-import-batch.php' (include_path='.:/usr/share/php') in wp-content/plugins/astra-sites/inc/classes/batch-import/class-astra-sites-batch-site-import.php on line 68
    • > PHP Warning
      Use of undefined constant ASTRA_SITES_DIR - assumed 'ASTRA_SITES_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/astra-sites/inc/classes/compatibility/class-astra-sites-compatibility.php on line 48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/astra-sites/inc/importers/class-astra-sites-helper.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/astra-sites/inc/classes/compatibility/astra-pro/class-astra-sites-compatibility-astra-pro.php:48
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/image.php' (include_path='.:/usr/share/php') in wp-content/plugins/astra-sites/inc/classes/batch-import/class-astra-sites-batch-import.php on line 48
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/astra-sites/inc/importers/batch-processing/class-astra-sites-batch-processing.php on line 124
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/astra-sites/inc/lib/gutenberg-templates/classes/class-ast-block-templates-image-importer.php on line 65
    • > PHP Fatal error
      require_once(): Failed opening required 'ASTRA_SITES_DIRinc/classes/compatibility/astra-pro/class-astra-sites-compatibility-astra-pro.php' (include_path='.:/usr/share/php') in wp-content/plugins/astra-sites/inc/classes/compatibility/class-astra-sites-compatibility.php on line 48
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/astra-sites/inc/classes/batch-import/class-astra-sites-batch-import.php on line 48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/astra-sites/inc/lib/gutenberg-templates/ast-block-templates.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: block editor, templates, gutenberg, elementor, beaver builder...

astra-sites/astra-sites.php 92% from 13 tests

The main file in "Starter Templates — Elementor, WordPress & Beaver Builder Templates" v. 3.4.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 263 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin38,021 lines of code in 304 files:
LanguageFilesBlank linesComment linesLines of code
PHP733,5847,17112,517
JavaScript961,53378212,207
CSS281,48012010,850
Sass2122092,013
SVG2327328
JSON611065
Markdown19040
HTML1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity32.86
▷ Minimum class complexity1.00
▷ Maximum class complexity303.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes63
▷ Abstract classes23.17%
▷ Concrete classes6196.83%
▷ Final classes00.00%
Methods635
▷ Static methods10516.54%
▷ Public methods53484.09%
▷ Protected methods599.29%
▷ Private methods426.61%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants21
▷ Global constants1990.48%
▷ Class constants29.52%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.96MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/assets/images/welcome.png176.71KB50.46KB▼ 71.44%
inc/assets/images/pixabay-logo.png7.03KB7.12KB0.00%
inc/lib/gutenberg-templates/dist/placeholder.png50.74KB25.55KB▼ 49.64%
inc/assets/images/templates-showcase.png545.80KB142.45KB▼ 73.90%
inc/assets/images/placeholder.png50.74KB25.55KB▼ 49.64%