90% loginator

Code Review | Loginator

WordPress plugin Loginator scored90%from 54 tests.

About plugin

  • Plugin page: loginator
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 16, 2020
  • Latest release: Jan 27, 2023
  • Number of updates: 14
  • Update frequency: every 59.6 days
  • Top authors: polyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /809 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.60ms] Passed 4 tests

An overview of server-side resources used by Loginator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0649.69 ▲6.17
Dashboard /wp-admin3.40 ▲0.0654.54 ▼0.37
Posts /wp-admin/edit.php3.52 ▲0.1252.36 ▼3.96
Add New Post /wp-admin/post-new.php5.99 ▲0.0693.90 ▼24.24
Media Library /wp-admin/upload.php3.33 ▲0.0644.22 ▲7.48

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • You have illegally modified 2 files (0.05KB) outside of "wp-content/plugins/loginator/" and "wp-content/uploads/"
    • (new file) wp-logs/.htaccess
    • (new file) wp-logs/index.php
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Loginator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲1214.25 ▼0.331.68 ▼0.3046.01 ▲4.60
Dashboard /wp-admin2,201 ▲245.59 ▼0.0895.64 ▲9.9347.11 ▼0.77
Posts /wp-admin/edit.php2,110 ▲311.98 ▼0.0335.53 ▼3.4935.17 ▼3.41
Add New Post /wp-admin/post-new.php1,535 ▲723.53 ▲0.56662.30 ▼2.5354.16 ▲0.68
Media Library /wp-admin/upload.php1,409 ▲94.19 ▼0.07111.73 ▼0.0748.42 ▼0.79

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
The SRP test was a success

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: error, logger, error handling, developer, dev...

loginator/loginator.php Passed 13 tests

The entry point to "Loginator" version 2.0.1 is a PHP file that has certain tags in its header comment area
63 characters long description:
Adds simple global methods for logging to files for developers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected295 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP177233287
CSS1078

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods1157.89%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/logo.png6.02KB2.26KB▼ 62.47%