10% simple-recent-posts-widget

Code Review | Simple Recent Posts Widget

WordPress plugin Simple Recent Posts Widget scored10%from 54 tests.

About plugin

  • Plugin page: simple-recent-pos...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Aug 29, 2016
  • Latest release: Mar 26, 2018
  • Number of updates: 5
  • Update frequency: every 118.0 days
  • Top authors: anshuln90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,778 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/simple-recent-posts-widget/simple-recent-posts-widget.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; al_simple_recent_posts has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼60.23ms] Passed 4 tests

A check of server-side resources used by Simple Recent Posts Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.375.24 ▼34.63
Dashboard /wp-admin2.12 ▼1.235.77 ▼61.92
Posts /wp-admin/edit.php2.12 ▼1.248.00 ▼42.24
Add New Post /wp-admin/post-new.php2.12 ▼3.776.19 ▼102.11
Media Library /wp-admin/upload.php2.12 ▼1.117.19 ▼30.08

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Simple Recent Posts Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.43 ▼0.251.68 ▲0.1740.28 ▼1.78
Dashboard /wp-admin2,200 ▲155.81 ▲0.00104.47 ▼7.7637.82 ▼4.04
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0237.94 ▼2.8234.59 ▲0.37
Add New Post /wp-admin/post-new.php1,539 ▲12823.16 ▲5.57659.89 ▲6.5559.61 ▼8.23
Media Library /wp-admin/upload.php1,391 ▼04.30 ▲0.1195.47 ▼22.3446.12 ▼2.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-recent-posts-widget/simple-recent-posts-widget.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; al_simple_recent_posts has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_al_simple_recent_posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-recent-posts-widget/simple-recent-posts-widget.php:12

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)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
  • Screenshots: A description for screenshot #2 is required in simple-recent-posts-widget/assets to your readme.txt
The official readme.txt is a good inspiration

simple-recent-posts-widget/simple-recent-posts-widget.php Passed 13 tests

"Simple Recent Posts Widget" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
90 characters long description:
Provides a simple recent posts widget, including thumbnails, category, and number options.

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
Success! There were no dangerous files found in this plugin138 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
No PNG images were found in this plugin