10% last-seen-posts-widget

Code Review | Last Seen Posts Widget

WordPress plugin Last Seen Posts Widget scored10%from 54 tests.

About plugin

  • Plugin page: last-seen-posts-w...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2.4
  • WordPress version: 6.3.1
  • First release: Dec 15, 2012
  • Latest release: Aug 8, 2015
  • Number of updates: 13
  • Update frequency: every 74.3 days
  • Top authors: veganist (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,621 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/last-seen-posts-widget/lastseenposts.php+147
    Function create_function() is deprecated

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

An overview of server-side resources used by Last Seen Posts Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.14 ▼36.21
Dashboard /wp-admin2.09 ▼1.216.55 ▼47.43
Posts /wp-admin/edit.php2.10 ▼1.275.54 ▼47.37
Add New Post /wp-admin/post-new.php2.10 ▼3.805.66 ▼112.51
Media Library /wp-admin/upload.php2.10 ▼1.147.13 ▼34.28

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_lastseenposts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Last Seen Posts Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲3014.25 ▼0.021.93 ▼0.3645.33 ▼2.72
Dashboard /wp-admin2,195 ▲215.62 ▼0.0484.41 ▼12.1739.88 ▼8.07
Posts /wp-admin/edit.php2,100 ▼02.14 ▲0.1336.06 ▼3.9038.58 ▼0.00
Add New Post /wp-admin/post-new.php1,525 ▼123.59 ▲0.59709.37 ▲12.2358.69 ▲1.88
Media Library /wp-admin/upload.php1,400 ▼04.09 ▼0.11111.33 ▲8.3347.67 ▲2.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/last-seen-posts-widget/lastseenposts.php+147
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_lastseenposts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/last-seen-posts-widget/lastseenposts.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Screenshot of widget and result in sidebar)
The official readme.txt is a good inspiration

last-seen-posts-widget/lastseenposts.php 92% from 13 tests

The main PHP script in "Last Seen Posts Widget" version 1.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("last-seen-posts-widget.php" instead of "lastseenposts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin100 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1145391
CSS1109

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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
1 PNG file occupies 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png157.61KB54.61KB▼ 65.35%