84% recent-posts-easy

Code Review | Recent Posts Easy

WordPress plugin Recent Posts Easy scored84%from 54 tests.

About plugin

  • Plugin page: recent-posts-easy
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2023
  • Latest release: Mar 7, 2023
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: eraplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /110 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by Recent Posts Easy
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.20 ▲1.56
Dashboard /wp-admin3.31 ▲0.0149.77 ▼2.26
Posts /wp-admin/edit.php3.36 ▲0.0155.90 ▲5.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.62 ▼8.74
Media Library /wp-admin/upload.php3.24 ▲0.0136.70 ▼0.22

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Recent Posts Easy
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.131.82 ▲0.0445.29 ▼0.32
Dashboard /wp-admin2,192 ▲185.60 ▲0.0188.63 ▼0.8440.96 ▼6.93
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0341.19 ▲2.7535.67 ▲2.80
Add New Post /wp-admin/post-new.php1,554 ▲2918.25 ▲0.55611.93 ▼31.2056.18 ▲0.61
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0497.14 ▼9.2241.08 ▼9.59

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

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/recent-posts-easy/recent-posts-easy.php:51

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 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
4 plugin tags: meta descriptions, thumbnails, shortcode, recent posts

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

The principal PHP file in "Recent Posts Easy" v. 1.0 is loaded by WordPress automatically on each request
85 characters long description:
A simple shortcode for displaying recent posts with thumbnails and meta descriptions.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17935

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin