10% track-unauthorized-access

Code Review | Track unauthorized access

WordPress plugin Track unauthorized access scored10%from 54 tests.

About plugin

  • Plugin page: track-unauthorize...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.8.1
  • WordPress version: 6.3.1
  • First release: Aug 29, 2021
  • Latest release: Sep 19, 2021
  • Number of updates: 56
  • Update frequency: every 5.5 days
  • Top authors: mswarak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /407 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/track-unauthorized-access/index.php+12
    Undefined variable: wpdb

Server metrics [RAM: ▲0.05MB] [CPU: ▲2.98ms] Passed 4 tests

Analyzing server-side resources used by Track unauthorized access
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /36.06 ▲32.556,679,012.88 ▲6,678,968.77
Dashboard /wp-admin3.39 ▲0.0061.39 ▼5.36
Posts /wp-admin/edit.php3.51 ▲0.1067.82 ▲9.79
Add New Post /wp-admin/post-new.php5.97 ▲0.04102.92 ▼10.04
Media Library /wp-admin/upload.php3.32 ▲0.0453.84 ▲17.54

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: 1 new table, 6 new options
New tables
wp_mswarak_track_unauthorized_access
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Track unauthorized access
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.38 ▲0.211.74 ▲0.2543.94 ▲3.02
Dashboard /wp-admin2,211 ▲315.62 ▼0.0490.51 ▲0.9737.80 ▼3.34
Posts /wp-admin/edit.php2,119 ▲192.00 ▲0.0245.20 ▲8.4341.01 ▲6.05
Add New Post /wp-admin/post-new.php1,539 ▲323.15 ▲4.93634.94 ▼31.1858.14 ▼16.36
Media Library /wp-admin/upload.php1,419 ▲164.19 ▼0.0898.54 ▼1.4248.97 ▲4.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_mswarak_track_unauthorized_access
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/track-unauthorized-access/index.php:284
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/track-unauthorized-access/index.php on line 12
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/track-unauthorized-access/index.php on line 12

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: The official readme.txt is a good inspiration

track-unauthorized-access/index.php 92% from 13 tests

Analyzing the main PHP file in "Track unauthorized access" version 1.1.6
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("track-unauthorized-access.php" instead of "index.php")

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 detected199 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13355199

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin