99% recent-posts-shortcode-widget

Code Review | Recent Posts Shortcode & Widget

WordPress plugin Recent Posts Shortcode & Widget scored 99% from 54 tests.

About plugin

  • Plugin page: recent-posts-shor...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.4
  • WordPress version: 5.9.2
  • First release: Mar 9, 2017
  • Latest release: Mar 14, 2018
  • Number of updates: 77
  • Update frequency: every 4.7 days
  • Top authors: rajros (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

800+ active / 9,265 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by Recent Posts Shortcode & Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0458.13 ▲8.70
Dashboard /wp-admin3.45 ▲0.0434.11 ▲0.55
Posts /wp-admin/edit.php3.68 ▲0.0436.60 ▼1.27
Add New Post /wp-admin/post-new.php6.92 ▼0.0596.50 ▼1,176.80
Media Library /wp-admin/upload.php3.33 ▲0.0325.22 ▲0.04

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Recent Posts Shortcode & Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,764 ▲4216.18 ▲0.445.87 ▼0.482.28 ▲0.03
Dashboard /wp-admin2,895 ▲416.16 ▼0.04119.08 ▼15.75152.20 ▼13.43
Posts /wp-admin/edit.php2,685 ▼93.24 ▲0.0063.16 ▲0.28147.07 ▲5.09
Add New Post /wp-admin/post-new.php1,760 ▼1322.62 ▲0.90416.09 ▼59.54162.94 ▼1.50
Media Library /wp-admin/upload.php1,698 ▼05.46 ▼0.06139.71 ▼7.70190.69 ▲2.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: A description for screenshot #6 is missing in recent-posts-shortcode-widget/assets to your readme.txt
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt might help

recent-posts-shortcode-widget/index.php 92% from 13 tests

The main PHP script in "Recent Posts Shortcode & Widget" version 1.8 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("recent-posts-shortcode-widget.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin445 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP114543261
CSS1482184

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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
No PNG images were found in this plugin