84% sw-wp-track-user-referer

Code Review | SW WP Track User Referer

WordPress plugin SW WP Track User Referer scored84%from 54 tests.

About plugin

  • Plugin page: sw-wp-track-user-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2021
  • Latest release: Dec 7, 2021
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: sharique1988 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /256 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.01ms] Passed 4 tests

An overview of server-side resources used by SW WP Track User Referer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.51 ▼5.04
Dashboard /wp-admin3.32 ▼0.0343.95 ▼18.11
Posts /wp-admin/edit.php3.37 ▲0.0150.32 ▼2.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.99 ▼18.43
Media Library /wp-admin/upload.php3.24 ▲0.0138.07 ▲2.33

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SW WP Track User Referer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.041.88 ▲0.3240.80 ▼2.60
Dashboard /wp-admin2,209 ▲185.91 ▲0.01111.62 ▲7.0342.25 ▼2.32
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0239.06 ▲3.3134.81 ▼1.74
Add New Post /wp-admin/post-new.php1,542 ▲2818.12 ▲0.54637.58 ▼54.4953.89 ▼7.84
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.0496.30 ▼4.5741.20 ▼3.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sw-wp-track-user-referer/sw-wp-track-user-referer.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Screenshot #1 (User Table in Action) image required
You can look at the official readme.txt

sw-wp-track-user-referer/sw-wp-track-user-referer.php 92% from 13 tests

"SW WP Track User Referer" version 1.0'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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected55 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1251330
Markdown115025

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin