84% templ-optimizer

Code Review | Templ Optimizer

WordPress plugin Templ Optimizer scored84%from 54 tests.

About plugin

  • Plugin page: templ-optimizer
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2021
  • Latest release: Nov 15, 2023
  • Number of updates: 15
  • Update frequency: every 48.5 days
  • Top authors: templ (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /3,849 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.22ms] Passed 4 tests

A check of server-side resources used by Templ Optimizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1440.44 ▲1.69
Dashboard /wp-admin3.45 ▲0.1446.00 ▼0.94
Posts /wp-admin/edit.php3.56 ▲0.2047.33 ▼1.37
Add New Post /wp-admin/post-new.php6.06 ▲0.1691.59 ▼12.24
Media Library /wp-admin/upload.php3.37 ▲0.1435.86 ▲5.53
Templ Optimizer /wp-admin/tools.php?page=templ-optimizer3.3430.05

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
templ_optimizer_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for Templ Optimizer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.67 ▲0.531.75 ▼0.0843.66 ▼1.48
Dashboard /wp-admin2,199 ▲225.58 ▼0.0693.61 ▲6.3742.72 ▲1.59
Posts /wp-admin/edit.php2,106 ▲91.86 ▼0.0835.05 ▼2.6437.21 ▲4.62
Add New Post /wp-admin/post-new.php1,528 ▲123.51 ▲0.32632.60 ▼52.4861.52 ▲1.55
Media Library /wp-admin/upload.php1,401 ▲44.22 ▼0.04100.03 ▲1.7142.01 ▲1.19
Templ Optimizer /wp-admin/tools.php?page=templ-optimizer1,70210.91192.40132.39

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
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • templ_optimizer_settings
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'templOptimizer' not found in wp-content/plugins/templ-optimizer/includes/vendor/WPConfigTransformer.php:6

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: performance, optimize, database, speed, clean-up

templ-optimizer/templ-optimizer.php Passed 13 tests

The primary PHP file in "Templ Optimizer" version 2.0.1 is used by WordPress to initiate all plugin functionality
139 characters long description:
An easy-to-use optimization plugin that lets you clean your database and tweak various performance related settings on your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin914 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6235171829
JavaScript202833
CSS36031
HTML11021

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity17.20
▷ Minimum class complexity5.00
▷ Maximum class complexity40.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods57
▷ Static methods00.00%
▷ Public methods5392.98%
▷ Protected methods47.02%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin