83% session-save-user

Code Review | Session Save User

WordPress plugin Session Save User scored83%from 54 tests.

About plugin

  • Plugin page: session-save-user
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9
  • WordPress version: 6.3.1
  • First release: Nov 29, 2017
  • Latest release: Nov 29, 2017
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: albertdesinger (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /590 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Session Save User
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.85 ▲3.02
Dashboard /wp-admin3.31 ▲0.0150.07 ▲1.25
Posts /wp-admin/edit.php3.37 ▲0.0147.55 ▼2.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.25 ▼1.06
Media Library /wp-admin/upload.php3.24 ▲0.0138.62 ▲4.21

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Session Save User: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.27 ▼1.104.83 ▲2.8539.61 ▼3.33
Dashboard /wp-admin2,208 ▲204.87 ▼1.03113.79 ▲7.5140.73 ▲1.61
Posts /wp-admin/edit.php2,097 ▲82.02 ▲0.0039.51 ▼6.7834.83 ▼0.87
Add New Post /wp-admin/post-new.php1,533 ▲423.23 ▲0.06658.48 ▼13.0954.24 ▼5.70
Media Library /wp-admin/upload.php1,393 ▲54.20 ▲0.02108.99 ▼0.7846.50 ▲2.36

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • 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 no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 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/session-save-user/session-save-user.php:20

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

readme.txt 88% 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:
  • Tags: There are too many tags (17 tag instead of maximum 10)
  • Screenshots: Please add an image for screenshot #1 (When you start a session with a wordpress account, this logged-in user is saved and when you close the session you can view it as shown in the screenshot, thus clicking on the avatar will insert the user name in the field but not the password. security)
The official readme.txt might help

session-save-user/session-save-user.php 85% from 13 tests

"Session Save User" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 253 characters long)
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist

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
Success! There were no dangerous files found in this plugin214 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2187141
CSS11046
PHP141427

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected