78% wptemplata

Code Review | WP Templata - WordPress Template Library for Elementor

WordPress plugin WP Templata - WordPress Template Library for Elementor scored78%from 54 tests.

About plugin

  • Plugin page: wptemplata
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 15, 2020
  • Latest release: Aug 3, 2023
  • Number of updates: 13
  • Update frequency: every 95.2 days
  • Top authors: hasthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /4,580 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲3.35MB] [CPU: ▲49.61ms] Passed 4 tests

An overview of server-side resources used by WP Templata - WordPress Template Library for Elementor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.35 ▲3.89100.72 ▲62.51
Dashboard /wp-admin7.37 ▲4.02106.75 ▲47.90
Posts /wp-admin/edit.php7.37 ▲4.01106.57 ▲58.29
Add New Post /wp-admin/post-new.php7.37 ▲1.48159.90 ▲72.14
Media Library /wp-admin/upload.php7.37 ▲4.1363.54 ▲29.72
Templates Library /wp-admin/admin.php?page=wptemplata-templates8.43161.65
Settings /wp-admin/admin.php?page=wptemplata7.3793.07

Server storage [IO: ▲1.63MB] [DB: ▲0.60MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
wptemplata_general_tabs
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

WP Templata - WordPress Template Library for Elementor: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲22014.66 ▲0.041.61 ▲0.0338.84 ▼7.37
Dashboard /wp-admin2,375 ▲1986.35 ▲0.76121.22 ▲33.5542.35 ▼2.40
Posts /wp-admin/edit.php2,303 ▲2033.56 ▲1.5545.86 ▲9.2631.66 ▼7.96
Add New Post /wp-admin/post-new.php1,571 ▲4522.03 ▼1.04614.58 ▼103.6438.87 ▼12.98
Media Library /wp-admin/upload.php1,440 ▲404.28 ▲0.1179.85 ▼26.3244.57 ▼4.80
Templates Library /wp-admin/admin.php?page=wptemplata-templates1,6239.83166.2650.17
Settings /wp-admin/admin.php?page=wptemplata1,0413.4546.2466.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • wptemplata_general_tabs
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wptemplata/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wptemplata/includes/admin/view/templates_list.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=wptemplata-templates
    • > Network (severe)
    https://api.hasthemes.com/api/wptemplata/layout-image/thumb/fashion_h1.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wptemplata-templates
    • > Network (severe)
    https://api.hasthemes.com/api/wptemplata/layout-image/thumb/cosmetic_h6.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wptemplata-templates
    • > Network (severe)
    https://api.hasthemes.com/api/wptemplata/layout-image/thumb/carmotors_h35.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wptemplata-templates
    • > Network (severe)
    https://api.hasthemes.com/api/wptemplata/layout-image/thumb/book_h20.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wptemplata-templates
    • > Network (severe)
    https://api.hasthemes.com/api/wptemplata/layout-image/thumb/animalspets_h37.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wptemplata-templates
    • > Network (severe)
    https://api.hasthemes.com/api/wptemplata/layout-image/thumb/electronics_h9.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wptemplata-templates
    • > Network (severe)
    https://api.hasthemes.com/api/wptemplata/layout-image/thumb/food_h22.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wptemplata-templates
    • > Network (severe)
    https://api.hasthemes.com/api/wptemplata/layout-image/thumb/flowers_h31.jpg - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: astra template, pre build template, elementor, wp template, template

wptemplata/wptemplata.php 92% from 13 tests

The main PHP script in "WP Templata - WordPress Template Library for Elementor" version 1.0.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected16,978 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JSON11,489014,469
CSS212533963
PHP8260277960
JavaScript6103113586

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.40
Average class complexity27.00
▷ Minimum class complexity2.00
▷ Maximum class complexity72.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods64
▷ Static methods57.81%
▷ Public methods6296.88%
▷ Protected methods11.56%
▷ Private methods11.56%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected