84% tgg-wp-optimizer

Code Review | TGG WP Optimizer

WordPress plugin TGG WP Optimizer scored84%from 54 tests.

About plugin

  • Plugin page: tgg-wp-optimizer
  • Plugin version: 1.21
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 28, 2022
  • Latest release: Aug 22, 2023
  • Number of updates: 9
  • Update frequency: every 53.6 days
  • Top authors: preetindersodhi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /1,074 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.60MB] [CPU: ▼14.49ms] Passed 4 tests

Server-side resources used by TGG WP Optimizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.08 ▼7.30
Dashboard /wp-admin3.34 ▼0.0151.03 ▼20.19
Posts /wp-admin/edit.php3.39 ▲0.0354.34 ▲3.00
Add New Post /wp-admin/post-new.php3.42 ▼2.4770.08 ▼33.47
Media Library /wp-admin/upload.php3.26 ▲0.0343.95 ▲8.51
WP Optimizer /wp-admin/options-general.php?page=wpotgg3.2334.21

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 32 new options
New WordPress options
can_compress_scripts
wpotgg_autosave
wpotgg_redirect
wpotgg_duotone
widget_recent-posts
wpotgg_rsdlink
wpotgg_categorysitemap
wpotgg_authorsitemap
wpotgg_wpgen
wpotgg_prefetch
...

Browser metrics Passed 4 tests

A check of browser resources used by TGG WP Optimizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,762 ▲114.05 ▼0.331.50 ▼0.4244.21 ▼8.70
Dashboard /wp-admin2,194 ▲175.56 ▼0.0296.68 ▲6.3138.16 ▼0.94
Posts /wp-admin/edit.php2,106 ▲62.03 ▲0.0039.32 ▼0.2235.16 ▼3.23
Add New Post /wp-admin/post-new.php3,106 ▲1,5787.67 ▼15.35193.40 ▼433.7672.66 ▲13.96
Media Library /wp-admin/upload.php1,406 ▲64.22 ▲0.03111.46 ▲3.5748.15 ▲1.50
WP Optimizer /wp-admin/options-general.php?page=wpotgg1,2362.0326.9430.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 32 options in the database
    • wpotgg_excerptmore
    • can_compress_scripts
    • wpotgg_oembed
    • wpotgg_wpgen
    • widget_recent-comments
    • wpotgg_wlwlink
    • widget_theysaidso_widget
    • wpotgg_emailverification
    • wpotgg_categorysitemap
    • wpotgg_classicwidgets
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/tgg-wp-optimizer/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: auto save, trash, excerpt length, tweaks, image caption...

tgg-wp-optimizer/index.php 85% from 13 tests

"TGG WP Optimizer" version 1.21'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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tgg-wp-optimizer.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 168 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin371 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14948371

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin