10% last-edited-posts

Code Review | Last Edited Posts

WordPress plugin Last Edited Posts scored10%from 54 tests.

About plugin

  • Plugin page: last-edited-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0.3
  • WordPress version: 6.3.1
  • First release: Sep 5, 2017
  • Latest release: Oct 26, 2022
  • Number of updates: 11
  • Update frequency: every 170.6 days
  • Top authors: pctricks.ir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /553 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
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method lasteditedposts::lasteditedposts_active() should not be called statically

Server metrics [RAM: ▼1.71MB] [CPU: ▼48.75ms] Passed 4 tests

A check of server-side resources used by Last Edited Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.22 ▼34.72
Dashboard /wp-admin2.30 ▼1.0011.51 ▼38.48
Posts /wp-admin/edit.php2.30 ▼1.0610.15 ▼36.54
Add New Post /wp-admin/post-new.php2.30 ▼3.5910.02 ▼85.24
Media Library /wp-admin/upload.php2.30 ▼0.938.73 ▼23.53

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_lep_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Last Edited Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.184.78 ▲2.9344.45 ▼1.25
Dashboard /wp-admin2,209 ▲344.87 ▼0.0698.13 ▼10.5739.44 ▼1.98
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0036.50 ▲1.1130.94 ▼2.41
Add New Post /wp-admin/post-new.php1,533 ▲1422.99 ▼0.25647.82 ▼23.1350.31 ▼5.57
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0195.60 ▲0.7540.81 ▼1.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method lasteditedposts::widget_lasteditedposts_init() should not be called statically
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_lep_widget
    • widget_recent-posts

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

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
  • 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-edited-posts/last-edited-posts.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === last-edited-posts === )
You can look at the official readme.txt

last-edited-posts/last-edited-posts.php 92% from 13 tests

The primary PHP file in "Last Edited Posts" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin110 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1201586
PO File19119324

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected