10% lord-linus-online-visitor

Code Review | Lord Linus Online Visitor Widget

WordPress plugin Lord Linus Online Visitor Widget scored10%from 54 tests.

About plugin

  • Plugin page: lord-linus-online...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2+
  • WordPress version: 6.3.1
  • First release: Apr 3, 2014
  • Latest release: Apr 7, 2014
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: rohitashv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,291 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/lord-linus-online-visitor/lord-linus-online-visitor.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; LordlinusOnlineV has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼51.34ms] Passed 4 tests

Server-side resources used by Lord Linus Online Visitor Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.77 ▼32.18
Dashboard /wp-admin2.09 ▼1.216.24 ▼43.64
Posts /wp-admin/edit.php2.09 ▼1.276.11 ▼39.29
Add New Post /wp-admin/post-new.php2.09 ▼3.805.26 ▼90.25
Media Library /wp-admin/upload.php2.09 ▼1.145.41 ▼27.00
Uninstall /wp-admin/admin.php?page=uninstall2.094.94
Online Visitor /wp-admin/admin.php?page=llov-main2.095.89

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: 1 new table, 8 new options
New tables
useronline
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
lord_total_visitor
widget_lordlinusonlinev
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Lord Linus Online Visitor Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.24 ▼0.061.74 ▼0.0945.66 ▲0.63
Dashboard /wp-admin2,209 ▲325.51 ▼0.0395.80 ▼7.4475.63 ▲30.11
Posts /wp-admin/edit.php2,129 ▲292.03 ▲0.0934.69 ▼3.0831.91 ▼2.98
Add New Post /wp-admin/post-new.php1,571 ▲4523.22 ▼0.02762.13 ▲99.0862.09 ▼2.70
Media Library /wp-admin/upload.php1,429 ▲294.20 ▼0.0094.00 ▼8.2070.67 ▲27.35
Uninstall /wp-admin/admin.php?page=uninstall8191.9923.6923.70
Online Visitor /wp-admin/admin.php?page=llov-main8422.0325.5923.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/lord-linus-online-visitor/lord-linus-online-visitor.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; LordlinusOnlineV has a deprecated constructor
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • useronline
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • lord_total_visitor
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_lordlinusonlinev

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=llov-main
    • > Deprecated in wp-content/plugins/lord-linus-online-visitor/lord-linus-online-visitor.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; LordlinusOnlineV has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=llov-main
    • > Deprecated in wp-content/plugins/lord-linus-online-visitor/lord-linus-online-visitor.php+91
    Function create_function() is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=llov-main
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in LordlinusOnlineV is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 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
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lord-linus-online-visitor/lord-linus-online-visitor.php:10
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/lord-linus-online-visitor/install-script.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lord-linus-online-visitor/menu-pages/setting.php:41

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === lord-linus-online-visitor === )
  • Screenshots: Please add images for these screenshots: #1 (Online Widget), #2 (Setting Menu)
You can look at the official readme.txt

lord-linus-online-visitor/lord-linus-online-visitor.php Passed 13 tests

The primary PHP file in "Lord Linus Online Visitor Widget" version 1.2 is used by WordPress to initiate all plugin functionality
118 characters long description:
This plugin shows the number of Online Visitor to your site. This is based on 5 minute activity of users on your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin286 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4149211
PO File2191975

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot2.png9.06KB4.30KB▼ 52.48%
sms.png0.13KB0.11KB▼ 17.52%
screenshot1.png2.28KB1.31KB▼ 42.56%