94% astra-sites

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

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

About plugin

  • Plugin page: astra-sites
  • Plugin version: 3.1.7
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.9.2
  • First release: Jul 26, 2017
  • Latest release: Mar 18, 2022
  • Number of updates: 200
  • Update frequency: every 8.5 days
  • Top authors: brainstormworg (51%)Nikschavan (38%)vrundakansara (8.5%)patilvikasj (4%)

Code review

54 tests

User reviews

2688 reviews

Install metrics

1,000,000+ active / 23,494,554 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲2.45MB] [CPU: ▼216.03ms] 75% from 4 tests

This is a short check of server-side resources used by Starter Templates — Elementor, WordPress & Beaver Builder Templates
Please take the time to fix the following items
  • RAM: You should keep total memory usage under 10MB (currently 19.11MB on /wp-admin/themes.php?page=starter-templates)
PageMemory (MB)CPU Time (ms)
Home /5.93 ▲2.4168.94 ▲19.47
Dashboard /wp-admin5.88 ▲2.4750.77 ▲16.82
Posts /wp-admin/edit.php6.09 ▲2.4455.83 ▲18.09
Add New Post /wp-admin/post-new.php9.50 ▲2.53350.00 ▼917.80
Media Library /wp-admin/upload.php5.76 ▲2.4741.63 ▲18.79
Starter Templates /wp-admin/themes.php?page=starter-templates19.11107.87

Server storage [IO: ▲5.51MB] [DB: ▲3.28MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 301 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Starter Templates — Elementor, WordPress & Beaver Builder Templates
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,839 ▲8516.21 ▲0.636.81 ▲0.392.54 ▲0.05
Dashboard /wp-admin2,936 ▲756.02 ▼0.16118.82 ▼16.04160.95 ▲0.79
Posts /wp-admin/edit.php2,725 ▲313.32 ▲0.0865.03 ▲0.26139.62 ▼4.38
Add New Post /wp-admin/post-new.php1,825 ▲16422.81 ▲5.74448.25 ▲24.11207.78 ▲47.06
Media Library /wp-admin/upload.php1,752 ▲545.63 ▲0.17130.29 ▼5.50203.33 ▲19.71
Starter Templates /wp-admin/themes.php?page=starter-templates2,17323.76491.51128.68

Uninstaller [IO: ▲0.00MB] [DB: ▲3.47MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 29× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > 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
    • > 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
      require_once(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory 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 add_action() in wp-content/plugins/astra-sites/inc/lib/gutenberg-templates/classes/class-ast-block-templates-sync-library.php:55
    • > PHP Warning
      require_once(ASTRA_SITES_DIRinc/classes/batch-import/class-astra-sites-batch-site-import-batch.php): failed to open stream: No such file or directory 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
      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 122
    • > PHP Warning
      require_once(ASTRA_SITES_DIRinc/classes/compatibility/astra-pro/class-astra-sites-compatibility-astra-pro.php): failed to open stream: No such file or directory 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_action() in wp-content/plugins/astra-sites/inc/classes/compatibility/uabb/class-astra-sites-compatibility-uabb.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: astra starter sites, elementor, gutenberg, templates, block editor...

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

The main PHP script in "Starter Templates — Elementor, WordPress & Beaver Builder Templates" version 3.1.7 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 263 characters long)

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 plugin39,812 lines of code in 277 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript932,1631,08914,471
PHP713,5226,95112,723
CSS281,41312010,390
Sass1921291,853
SVG1427280
JSON501054
Markdown19040
HTML1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity31.48
▷ Minimum class complexity1.00
▷ Maximum class complexity275.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes60
▷ Abstract classes23.33%
▷ Concrete classes5896.67%
▷ Final classes00.00%
Methods611
▷ Static methods10116.53%
▷ Public methods51083.47%
▷ Protected methods599.66%
▷ Private methods426.87%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants21
▷ Global constants1990.48%
▷ Class constants29.52%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.18MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/lib/onboarding/assets/images/placeholder.png50.74KB25.55KB▼ 49.64%
inc/lib/gutenberg-templates/dist/placeholder.png50.74KB25.55KB▼ 49.64%
inc/assets/images/pixabay-logo.png7.03KB7.12KB0.00%
inc/assets/images/placeholder.png50.74KB25.55KB▼ 49.64%
inc/assets/images/block-editor.png24.42KB5.73KB▼ 76.52%