78% tron-login-protect

Code Review | Tron Login Protect

WordPress plugin Tron Login Protect scored78%from 54 tests.

About plugin

  • Plugin page: tron-login-protect
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.13-6.0.3
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Nov 2, 2022
  • Number of updates: 22
  • Update frequency: every 0.3 days
  • Top authors: tronusa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /168 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.56ms] Passed 4 tests

Analyzing server-side resources used by Tron Login Protect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.11 ▲1.12
Dashboard /wp-admin3.33 ▲0.0344.23 ▼6.83
Posts /wp-admin/edit.php3.38 ▲0.0344.46 ▼2.21
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.34 ▼7.87
Media Library /wp-admin/upload.php3.25 ▲0.0333.11 ▼1.33
Tron Login Protect /wp-admin/options-general.php?page=tron-login-protect3.1929.82

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Tron Login Protect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.48 ▲0.092.14 ▲0.4945.08 ▲1.40
Dashboard /wp-admin2,213 ▲254.87 ▼0.99104.05 ▼13.5438.84 ▼3.45
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0134.53 ▼0.7736.38 ▲2.91
Add New Post /wp-admin/post-new.php1,546 ▲2718.11 ▼5.05640.93 ▲26.6952.35 ▼0.22
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0195.88 ▼5.4840.63 ▼4.81
Tron Login Protect /wp-admin/options-general.php?page=tron-login-protect7942.0225.6825.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=tron-login-protect
    • > Notice in wp-content/plugins/tron-login-protect/settings_page.php+39
    Undefined index: tron_login_protect_pin

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 fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tron-login-protect/row_meta.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tron-login-protect/row_meta.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tron-login-protect/settings_page.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: block hackers, secure admin, wp-admin protect

tron-login-protect/_.tron-login-protect.php 92% from 13 tests

The primary PHP file in "Tron Login Protect" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tron-login-protect.php" instead of "_.tron-login-protect.php")

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 plugin161 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP62746161

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-2.png12.69KB7.75KB▼ 38.89%
assets/images/screenshot-3.png3.48KB2.53KB▼ 27.41%
assets/images/screenshot-1.png7.34KB5.00KB▼ 31.88%