68% lana-security

Code Review | Lana Security

WordPress plugin Lana Security scored68%from 54 tests.

About plugin

  • Plugin page: lana-security
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Nov 12, 2016
  • Latest release: May 28, 2022
  • Number of updates: 71
  • Update frequency: every 28.4 days
  • Top authors: lanacodes (59.15%)lanadesign (42.25%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,250 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

This is a short check of server-side resources used by Lana Security
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.19 ▼5.09
Dashboard /wp-admin3.37 ▲0.0651.62 ▼0.03
Posts /wp-admin/edit.php3.42 ▲0.0654.29 ▲4.74
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.30 ▼13.84
Media Library /wp-admin/upload.php3.29 ▲0.0641.77 ▲4.39

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: 2 new tables, 6 new options
New tables
wp_lana_security_logs
wp_lana_security_login_logs
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lana Security
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲3614.10 ▼0.171.63 ▼0.8838.71 ▼3.74
Dashboard /wp-admin2,226 ▲525.51 ▼0.0783.30 ▼20.1137.78 ▼6.41
Posts /wp-admin/edit.php2,131 ▲312.01 ▼0.0145.86 ▲8.1538.87 ▲2.42
Add New Post /wp-admin/post-new.php1,551 ▲1523.14 ▲4.96662.32 ▲44.6060.44 ▼9.37
Media Library /wp-admin/upload.php1,431 ▲374.24 ▲0.0597.20 ▼11.7241.96 ▼4.81
Lana Security /wp-admin/lana-security.php260.420.1015.45
Settings /wp-admin/lana-security-settings.php260.420.096.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_lana_security_logs
    • wp_lana_security_login_logs
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/lana-security/includes/class-lana-security-plugins-list-table.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/lana-security/includes/class-lana-security-login-logs-list-table.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/lana-security/includes/class-lana-security-logs-list-table.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/lana-security.php
    • > Network (severe)
    wp-admin/lana-security.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/lana-security-settings.php
    • > Network (severe)
    wp-admin/lana-security-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% 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 need to be fixed:
  • Screenshots: These screenshots need descriptions #2, #3, #4, #5 in lana-security/assets to your readme.txt
Please take inspiration from this readme.txt

lana-security/lana-security.php Passed 13 tests

This is the main PHP file of "Lana Security" version 1.1.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
39 characters long description:
Simple and easy to use security plugin.

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
Success! There were no dangerous files found in this plugin3,052 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP55006651,790
JSON1001,205
JavaScript1111630
CSS25027

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity28.00
▷ Minimum class complexity25.00
▷ Maximum class complexity32.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods5198.08%
▷ Protected methods11.92%
▷ Private methods00.00%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.03MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/plugin-header.png28.91KB29.86KB0.00%