84% pe-recent-posts

Code Review | PE Recent Posts

WordPress plugin PE Recent Posts scored84%from 54 tests.

About plugin

  • Plugin page: pe-recent-posts
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.8
  • WordPress version: 6.3.1
  • First release: Aug 14, 2015
  • Latest release: Sep 2, 2021
  • Number of updates: 76
  • Update frequency: every 29.1 days
  • Top authors: pixelemu (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active /54,735 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.44ms] Passed 4 tests

A check of server-side resources used by PE Recent Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1838.48 ▼6.67
Dashboard /wp-admin3.48 ▲0.1746.06 ▼1.98
Posts /wp-admin/edit.php3.53 ▲0.1750.69 ▲3.36
Add New Post /wp-admin/post-new.php6.06 ▲0.1795.35 ▼2.75
Media Library /wp-admin/upload.php3.40 ▲0.1736.09 ▲1.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_pe_recent_posts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for PE Recent Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲18014.12 ▼0.4610.99 ▲9.2335.93 ▼9.21
Dashboard /wp-admin2,206 ▲515.89 ▲0.23110.07 ▲3.3141.96 ▼5.69
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0139.18 ▼12.1335.73 ▼15.32
Add New Post /wp-admin/post-new.php1,547 ▲1918.50 ▲0.33614.63 ▲5.5264.98 ▲18.16
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0694.34 ▼4.4240.20 ▼3.07

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_pe_recent_posts
    • can_compress_scripts
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pe-recent-posts/pe-recent-posts.php:17

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 on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

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

The main file in "PE Recent Posts" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
23 characters long description:
Simple Slider for Posts

Code Analysis 97% from 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 plugin4,014 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS2594153,103
PHP14436909
JavaScript1052

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 116)
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity120.00
▷ Minimum class complexity120.00
▷ Maximum class complexity120.00
Average method complexity30.75
▷ Minimum method complexity1.00
▷ Maximum method complexity116.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin