84% last-updated

Code Review | last updated

WordPress plugin last updated scored84%from 54 tests.

About plugin

  • Plugin page: last-updated
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Oct 6, 2013
  • Latest release: Oct 18, 2015
  • Number of updates: 27
  • Update frequency: every 27.5 days
  • Top authors: wudi96 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /6,924 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by last updated
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.29 ▼1.17
Dashboard /wp-admin3.32 ▲0.0244.33 ▼5.07
Posts /wp-admin/edit.php3.37 ▲0.0245.25 ▼1.68
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.19 ▼12.34
Media Library /wp-admin/upload.php3.24 ▲0.0135.97 ▼1.17

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_mw_lastupdated_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

last updated: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.141.53 ▼0.5142.41 ▼4.73
Dashboard /wp-admin2,203 ▲205.79 ▼0.10104.59 ▼10.6740.46 ▼6.14
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0639.15 ▲0.9034.43 ▲0.37
Add New Post /wp-admin/post-new.php1,533 ▲1923.17 ▲5.68662.79 ▼38.9954.16 ▼0.14
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0294.27 ▼5.8544.32 ▲1.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_mw_lastupdated_widget

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/last-updated/inc/class-mw-lastupdated-widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: last-updated, sidebar, custom post type, simple, widget

last-updated/lastupdated.php 92% from 13 tests

The entry point to "last updated" version 2.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("last-updated.php" instead of "lastupdated.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin313 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP65062266
PO File191632
JavaScript10015

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.83
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1780.95%
▷ Protected methods00.00%
▷ Private methods419.05%
Functions3
▷ Named functions3100.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