89% recent-posts-shortcode-widget

Code Review | Recent Posts Shortcode & Widget

WordPress plugin Recent Posts Shortcode & Widget scored89%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: 6.3.1
  • 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

500+ active /9,757 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by Recent Posts Shortcode & Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.17 ▲5.10
Dashboard /wp-admin3.31 ▲0.0145.14 ▼4.46
Posts /wp-admin/edit.php3.36 ▲0.0146.52 ▼1.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.34 ▼14.20
Media Library /wp-admin/upload.php3.23 ▲0.0035.74 ▲3.61

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Recent Posts Shortcode & Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.61 ▼0.781.72 ▼0.4640.75 ▼1.60
Dashboard /wp-admin2,206 ▲234.90 ▼1.04104.54 ▼9.1141.83 ▼2.32
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0539.63 ▼2.4136.65 ▲0.20
Add New Post /wp-admin/post-new.php1,542 ▲918.33 ▼4.78597.88 ▼0.9654.95 ▼5.13
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0295.11 ▼4.7640.01 ▼3.12

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

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

The main file in "Recent Posts Shortcode & Widget" v. 1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous 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
All good! No complexity issues found
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin