93% advanced-recent-posts

Code Review | Advanced Recent Posts

WordPress plugin Advanced Recent Posts scored 93% from 54 tests.

About plugin

  • Plugin page: advanced-recent-p...
  • Plugin version: 0.6.14
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.3
  • WordPress version: 5.9.2
  • First release: Mar 31, 2015
  • Latest release: Aug 20, 2015
  • Number of updates: 46
  • Update frequency: every 3.1 days
  • Top authors: eugenyh (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

7,000+ active / 77,506 total downloads


Plugin footprint Passed 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.34MB] [CPU: ▼295.19ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Recent Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4359.29 ▲4.62
Dashboard /wp-admin3.77 ▲0.3735.83 ▲1.90
Posts /wp-admin/edit.php4.00 ▲0.3639.63 ▲3.79
Add New Post /wp-admin/post-new.php7.28 ▲0.28101.74 ▼1,181.20
Media Library /wp-admin/upload.php3.65 ▲0.3524.82 ▼5.26

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Recent Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,940 ▲19516.50 ▲0.7510.53 ▲3.052.72 ▲0.53
Dashboard /wp-admin2,918 ▲576.15 ▼0.02118.74 ▼20.90151.26 ▼9.50
Posts /wp-admin/edit.php2,714 ▲203.24 ▼0.0063.79 ▲2.11138.10 ▲4.07
Add New Post /wp-admin/post-new.php1,736 ▼2217.49 ▼3.91424.30 ▼5.73191.43 ▲32.77
Media Library /wp-admin/upload.php1,724 ▲265.48 ▲0.03132.80 ▼4.49181.27 ▼7.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-recent-posts/lptw-recent-posts.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-recent-posts/includes/class.widget.small.thumbnails.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-recent-posts/includes/class.widget.fluid.images.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-recent-posts/backend/lptw-recent-posts-backend.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === advanced-recent-posts === )
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
Please take inspiration from this readme.txt

advanced-recent-posts/lptw-recent-posts.php 85% from 13 tests

The primary PHP file in "Advanced Recent Posts" version 0.6.14 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-recent-posts.php" instead of "lptw-recent-posts.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
No dangerous file extensions were detected3,064 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity102.00
▷ Minimum class complexity99.00
▷ Maximum class complexity105.00
Average method complexity21.20
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions24100.00%
▷ Anonymous functions00.00%
▷ 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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings