72% templateberg

Code Review | Templateberg - Gutenberg Templates, WordPress Themes Template Kits & WordPress Templates

WordPress plugin Templateberg - Gutenberg Templates, WordPress Themes Template Kits & WordPress Templates scored72%from 54 tests.

About plugin

  • Plugin page: templateberg
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.0
  • WordPress version: 6.3.1
  • First release: Mar 17, 2021
  • Latest release: Aug 3, 2022
  • Number of updates: 16
  • Update frequency: every 31.6 days
  • Top authors: templateberg (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

8,000+ active /81,573 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.07ms] Passed 4 tests

An overview of server-side resources used by Templateberg - Gutenberg Templates, WordPress Themes Template Kits & WordPress Templates
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0444.40 ▲2.01
Dashboard /wp-admin3.41 ▲0.1153.50 ▼1.27
Posts /wp-admin/edit.php3.46 ▲0.1151.68 ▼2.62
Add New Post /wp-admin/post-new.php5.96 ▲0.0787.31 ▼7.81
Media Library /wp-admin/upload.php3.27 ▲0.0536.17 ▼0.57
Themes Template Kits /wp-admin/admin.php?page=templateberg-themes-template-kits3.3738.05
Templateberg /wp-admin/admin.php?page=templateberg3.3036.28
Gutenberg Templates /wp-admin/admin.php?page=templateberg-gutenberg-templates3.3538.04

Server storage [IO: ▲1.17MB] [DB: ▲1.97MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
__templateberg_do_redirect
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Templateberg - Gutenberg Templates, WordPress Themes Template Kits & WordPress Templates
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8614.40 ▼0.221.82 ▼0.2443.99 ▼1.34
Dashboard /wp-admin2,257 ▲805.72 ▲0.0691.38 ▲4.9741.08 ▼3.43
Posts /wp-admin/edit.php2,159 ▲561.99 ▼0.0136.13 ▼6.4537.69 ▼2.32
Add New Post /wp-admin/post-new.php6,248 ▲4,72219.88 ▼3.32989.50 ▲362.2842.57 ▼2.42
Media Library /wp-admin/upload.php1,462 ▲624.18 ▼0.0397.05 ▼2.8939.99 ▼8.39
Themes Template Kits /wp-admin/admin.php?page=templateberg-themes-template-kits1,2852.4432.7839.50
Templateberg /wp-admin/admin.php?page=templateberg1,0432.1630.5635.73
Gutenberg Templates /wp-admin/admin.php?page=templateberg-gutenberg-templates9,2906.4784.6674.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • __templateberg_do_redirect
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/templateberg/includes/admin/templates/connecting.php
    • > /wp-content/plugins/templateberg/templateberg.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/templateberg/includes/lists/templates/gutenberg.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/templateberg/includes/lists/class-templateberg-themes-template-kits.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/templateberg/includes/admin/templates/getting-started.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/templateberg/includes/lists/class-templateberg-gutenberg-templates.php:57
    • > PHP Warning
      Use of undefined constant TEMPLATEBERG_URL - assumed 'TEMPLATEBERG_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/templateberg/includes/lists/templates/current-theme.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/templateberg/includes/admin/templates/faq.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/templateberg/includes/lists/templates/theme-buy-preview.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/templateberg/includes/lists/templates/theme.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function templateberg_theme_templates() in wp-content/plugins/templateberg/includes/lists/templates/current-theme.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/templateberg/includes/admin/templates/header.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=templateberg-gutenberg-templates
    • > Network (severe)
    https://templateberg.com/wp-content/uploads/2021/02/import.png - Failed to load resource: the server responded with a status of 403 ()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=templateberg-gutenberg-templates
    • > Network (severe)
    https://templateberg.com/wp-content/uploads/2021/02/getstarted.png - Failed to load resource: the server responded with a status of 403 ()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=templateberg-gutenberg-templates
    • > Network (severe)
    https://templateberg.com/wp-content/uploads/2021/02/customization.png - Failed to load resource: the server responded with a status of 403 ()

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: Please describe screenshot #4 in templateberg/assets to your readme.txt
The official readme.txt is a good inspiration

templateberg/templateberg.php 85% from 13 tests

Analyzing the main PHP file in "Templateberg - Gutenberg Templates, WordPress Themes Template Kits & WordPress Templates" version 1.1.5
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 214 characters long)
  • Plugin Name: Please shorten the plugin name (currently 88 characters long instead of max. 70)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected4,367 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP254321,2014,356
JavaScript5005
CSS3003
SVG2013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.58
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods110
▷ Static methods2018.18%
▷ Public methods10494.55%
▷ Protected methods00.00%
▷ Private methods65.45%
Functions40
▷ Named functions2972.50%
▷ Anonymous functions1127.50%
Constants14
▷ Global constants321.43%
▷ Class constants1178.57%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.26MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/theme-install.png67.15KB21.72KB▼ 67.66%
assets/img/theme-template-kits.png163.18KB50.63KB▼ 68.97%
assets/img/prospective-image-640x214.png34.24KB35.63KB0.00%
assets/img/logo-48x48.png0.66KB0.47KB▼ 29.20%