84% template-editor

Code Review | Options for Block Themes

WordPress plugin Options for Block Themes scored84%from 54 tests.

About plugin

  • Plugin page: template-editor
  • Plugin version: 1.2.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jul 26, 2021
  • Latest release: Oct 30, 2023
  • Number of updates: 30
  • Update frequency: every 27.6 days
  • Top authors: domainsupport (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /5,472 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼0.47ms] Passed 4 tests

This is a short check of server-side resources used by Options for Block Themes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3547.83 ▲7.99
Dashboard /wp-admin3.66 ▲0.3649.02 ▼0.69
Posts /wp-admin/edit.php3.78 ▲0.4250.23 ▲1.02
Add New Post /wp-admin/post-new.php6.24 ▲0.3687.21 ▼9.22
Media Library /wp-admin/upload.php3.59 ▲0.3638.27 ▲7.01
Manage Templates /wp-admin/themes.php?page=template_editor5.2056.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
te_options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Options for Block Themes: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.72 ▲0.461.63 ▲0.1040.11 ▲2.29
Dashboard /wp-admin2,203 ▲265.52 ▼0.1586.86 ▼16.3937.98 ▼6.27
Posts /wp-admin/edit.php2,105 ▲51.98 ▲0.0136.26 ▼0.6633.78 ▼1.19
Add New Post /wp-admin/post-new.php1,538 ▲1224.63 ▲1.62674.07 ▲26.1451.34 ▼24.23
Media Library /wp-admin/upload.php1,408 ▲54.25 ▲0.0794.38 ▼7.9642.14 ▲0.32
Manage Templates /wp-admin/themes.php?page=template_editor8,2491.6430.4232.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • te_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/template-editor/template-editor.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: global styles, block theme, google fonts, template parts, templates

template-editor/template-editor.php Passed 13 tests

The principal PHP file in "Options for Block Themes" v. 1.2.4 is loaded by WordPress automatically on each request
139 characters long description:
Import / Export tempaltes and template parts and add locally hosted Google Fonts to Full Site Editing / Block Themes without a child theme!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,003 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2906351,990
JavaScript15312
JSON1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity112.00
▷ Minimum class complexity6.00
▷ Maximum class complexity245.00
Average method complexity7.34
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods53
▷ Static methods4788.68%
▷ Public methods5298.11%
▷ Protected methods00.00%
▷ Private methods11.89%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin