10% latest-posts-widget

Code Review | Latest Posts Widget

WordPress plugin Latest Posts Widget scored 10% from 54 tests.

About plugin

  • Plugin page: latest-posts-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4
  • WordPress version: 5.8.1
  • First release: Jul 14, 2014
  • Latest release: Dec 16, 2015
  • Number of updates: 11
  • Update frequency: every 47.5 days
  • Top authors: mkrdip (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active / 11,361 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/latest-posts-widget/latest-posts.php+281
    Function create_function() is deprecated

Server metrics [RAM: ▼1.76MB] [CPU: ▼199.06ms] Passed 4 tests

Server-side resources used by Latest Posts Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼0.856.70 ▼19.83
Dashboard /wp-admin1.89 ▼1.177.50 ▼50.41
Posts /wp-admin/edit.php1.89 ▼1.224.90 ▼43.86
Add New Post /wp-admin/post-new.php1.89 ▼3.556.35 ▼676.62
Media Library /wp-admin/upload.php1.89 ▼1.126.19 ▼25.33

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
widget_latest-posts-widget

Browser metrics Passed 4 tests

Latest Posts Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲10916.16 ▲0.569.24 ▼1.9451.52 ▼2.15
Dashboard /wp-admin2,967 ▲365.87 ▼0.09142.48 ▼0.88119.08 ▲3.81
Posts /wp-admin/edit.php2,736 ▼32.68 ▼0.0063.80 ▼3.9696.60 ▲4.47
Add New Post /wp-admin/post-new.php1,683 ▲18118.79 ▲0.02385.69 ▲25.87119.46 ▲9.91
Media Library /wp-admin/upload.php1,810 ▲35.02 ▼0.02159.30 ▼2.76122.50 ▼2.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/latest-posts-widget/latest-posts.php+281
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_latest-posts-widget

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: widget, recent posts, latest posts widget, posts, posts widget...

latest-posts-widget/latest-posts.php 92% from 13 tests

The entry point to "Latest Posts Widget" version 1.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 ("latest-posts-widget.php" instead of "latest-posts.php")

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
There were no executable files found in this plugin231 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14943189
CSS11442

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity12.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%
Functions2
▷ Named functions2100.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 images were found in this plugin