74% easy-recent-posts

Code Review | Easy Recent Posts

WordPress plugin Easy Recent Posts scored74%from 54 tests.

About plugin

  • Plugin page: easy-recent-posts
  • Plugin version: 15.01
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.5.0
  • WordPress version: 6.3.1
  • First release: Jul 16, 2011
  • Latest release: Apr 6, 2016
  • Number of updates: 11
  • Update frequency: every 157.2 days
  • Top authors: christopherross (90.91%)nickadamstv (18.18%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /4,157 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.59MB] [CPU: ▼44.76ms] Passed 4 tests

A check of server-side resources used by Easy Recent Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.40 ▼1.0611.23 ▼33.65
Dashboard /wp-admin2.42 ▼0.8913.54 ▼40.00
Posts /wp-admin/edit.php2.42 ▼0.9415.03 ▼33.36
Add New Post /wp-admin/post-new.php2.42 ▼3.4713.74 ▼72.02
Media Library /wp-admin/upload.php2.42 ▼0.8211.80 ▼24.78

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_thissimyurl_easyrecentposts_widget
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Easy Recent Posts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.021.83 ▼0.2943.31 ▼5.11
Dashboard /wp-admin2,209 ▲214.85 ▼1.02100.12 ▼21.1239.97 ▼6.51
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0434.09 ▼6.2333.74 ▼0.74
Add New Post /wp-admin/post-new.php1,536 ▼723.21 ▲5.07653.46 ▲29.9356.44 ▼1.51
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0196.44 ▼4.3342.76 ▼0.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/easy-recent-posts/widgets/thissimyurl_EasyRecentPosts_Widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; thissimyurl_EasyRecentPosts_Widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_thissimyurl_easyrecentposts_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-recent-posts/widgets/thissimyurl_EasyRecentPosts_Widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

easy-recent-posts/easy-recent-posts.php Passed 13 tests

The principal PHP file in "Easy Recent Posts" v. 15.01 is loaded by WordPress automatically on each request
67 characters long description:
An easy to use WordPress function to add Recent Posts to any theme.

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
Everything looks great! No dangerous files found in this plugin505 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4223254320
PO File256112154
CSS121631

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.33
▷ Minimum class complexity7.00
▷ Maximum class complexity12.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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