72% templateberg

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

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

About plugin

  • Plugin page: templateberg
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9
  • WordPress version: 5.9.2
  • First release: Mar 17, 2021
  • Latest release: Feb 3, 2022
  • Number of updates: 14
  • Update frequency: every 23.1 days
  • Top authors: templateberg (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

7,000+ active / 44,809 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.45MB] [CPU: ▼297.79ms] Passed 4 tests

This is a short check of server-side resources used by Templateberg - Gutenberg Templates, WordPress Themes Template Kits & WordPress Templates
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.4854.23 ▲0.61
Dashboard /wp-admin3.83 ▲0.4240.77 ▼35.52
Posts /wp-admin/edit.php4.12 ▲0.4845.98 ▲8.20
Add New Post /wp-admin/post-new.php7.39 ▲0.4296.35 ▼1,157.09
Media Library /wp-admin/upload.php3.78 ▲0.4834.00 ▲0.83
Themes Template Kits /wp-admin/admin.php?page=templateberg-themes-template-kits3.8631.96
Templateberg /wp-admin/admin.php?page=templateberg3.7757.55
Gutenberg Templates /wp-admin/admin.php?page=templateberg-gutenberg-templates3.8164.93

Server storage [IO: ▲1.15MB] [DB: ▲1.85MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 1 new option
New WordPress options
__templateberg_do_redirect

Browser metrics Passed 4 tests

An overview of browser requirements for Templateberg - Gutenberg Templates, WordPress Themes Template Kits & WordPress Templates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,847 ▲10315.58 ▼0.0910.61 ▲4.712.65 ▲0.45
Dashboard /wp-admin2,944 ▲936.18 ▼0.03120.29 ▼19.14162.42 ▼5.20
Posts /wp-admin/edit.php2,755 ▲643.25 ▲0.0162.67 ▼4.50142.45 ▼62.14
Add New Post /wp-admin/post-new.php1,722 ▲2417.84 ▼3.87455.70 ▲27.11151.16 ▼23.67
Media Library /wp-admin/upload.php1,764 ▲665.51 ▼0.02141.43 ▼4.54188.59 ▼13.70
Themes Template Kits /wp-admin/admin.php?page=templateberg-themes-template-kits1,6863.2661.71142.73
Templateberg /wp-admin/admin.php?page=templateberg1,3183.1859.08184.53
Gutenberg Templates /wp-admin/admin.php?page=templateberg-gutenberg-templates1,6973.1862.61142.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • __templateberg_do_redirect

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

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 task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/templateberg/templateberg.php
    • > /wp-content/plugins/templateberg/includes/admin/templates/connecting.php
  • 14× 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 get_query_var() in wp-content/plugins/templateberg/includes/lists/templates/theme.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/header.php:5
    • > 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_url() in wp-content/plugins/templateberg/includes/lists/templates/getting-started.php:11
    • > 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 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 templateberg_theme_templates() in wp-content/plugins/templateberg/includes/lists/templates/current-theme.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/templateberg/includes/lists/class-templateberg-gutenberg-templates.php:57

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=templateberg-themes-template-kits
    • > Network (severe)
    http://localhost/templateberg/wp-content/plugins/templateberg/assets/img/logo-48x48.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Screenshots: A description for screenshot #4 is required in templateberg/assets to your readme.txt
The official readme.txt is a good inspiration

templateberg/templateberg.php 85% from 13 tests

"Templateberg - Gutenberg Templates, WordPress Themes Template Kits & WordPress Templates" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 214 characters long)
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 88 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin4,209 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP244041,1194,198
JavaScript5005
CSS3003
SVG2013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity20.45
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods102
▷ Static methods1817.65%
▷ Public methods9694.12%
▷ Protected methods00.00%
▷ Private methods65.88%
Functions39
▷ Named functions2871.79%
▷ Anonymous functions1128.21%
Constants15
▷ Global constants533.33%
▷ Class constants1066.67%
▷ Public constants10100.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/logo-48x48.png0.66KB0.47KB▼ 29.20%
assets/img/prospective-image-640x214.png34.24KB35.63KB0.00%
assets/img/theme-template-kits.png163.18KB50.63KB▼ 68.97%