84% tz-guard

Code Review | TZ Guard

WordPress plugin TZ Guard scored84%from 54 tests.

About plugin

  • Plugin page: tz-guard
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Mar 14, 2015
  • Latest release: Mar 14, 2015
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: templaza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /859 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.18ms] Passed 4 tests

This is a short check of server-side resources used by TZ Guard
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.46 ▼6.24
Dashboard /wp-admin3.32 ▲0.0246.67 ▼4.68
Posts /wp-admin/edit.php3.37 ▲0.0147.13 ▲2.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.10 ▼6.03
Media Library /wp-admin/upload.php3.24 ▲0.0135.81 ▲0.22
TZ Guard /wp-admin/tools.php?page=tz-guard3.2131.98

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

TZ Guard: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.59 ▼0.781.69 ▼0.2640.21 ▼2.54
Dashboard /wp-admin2,213 ▲254.85 ▼1.03103.47 ▼14.9638.43 ▼6.81
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0136.53 ▼1.8731.32 ▼4.88
Add New Post /wp-admin/post-new.php1,540 ▲2623.29 ▲5.69671.31 ▼22.4556.91 ▼0.32
Media Library /wp-admin/upload.php1,386 ▲14.25 ▲0.0394.81 ▼16.6442.56 ▼1.36
TZ Guard /wp-admin/tools.php?page=tz-guard8792.1926.1127.47

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tz-guard/tz-guard.php:18

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 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === tz-guard === )
  • Screenshots: Please add images for these screenshots: #1 (/trunk/screenshot-1.png), #2 (/trunk/screenshot-2.jpg), #3 (/trunk/screenshot-3.jpg), #4 (/trunk/screenshot-4.jpg)
The official readme.txt might help

tz-guard/tz-guard.php Passed 13 tests

The main PHP file in "TZ Guard" ver. 0.1.1 adds more information about the plugin and also serves as the entry point for this plugin
76 characters long description:
This is a simple plugin which will help you to security your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin646 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP273260627
PO File171418
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity58.50
▷ Minimum class complexity32.00
▷ Maximum class complexity85.00
Average method complexity7.39
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png62.81KB16.93KB▼ 73.05%