10% advanced-most-recent-posts-mod

Code Review | Advanced Most Recent Posts Mod

WordPress plugin Advanced Most Recent Posts Mod scored 10% from 54 tests.

About plugin

  • Plugin page: advanced-most-rec...
  • Plugin version: 1.6.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.2.1
  • WordPress version: 5.9.2
  • First release: Sep 10, 2010
  • Latest release: Oct 1, 2012
  • Number of updates: 29
  • Update frequency: every 25.9 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 56,605 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/advanced-most-recent-posts-mod/adv-most-recent.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; yg_recent_posts has a deprecated constructor

Server metrics [RAM: ▼2.33MB] [CPU: ▼360.45ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Most Recent Posts Mod
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.474.69 ▼55.03
Dashboard /wp-admin2.06 ▼1.354.50 ▼29.56
Posts /wp-admin/edit.php2.06 ▼1.584.31 ▼33.49
Add New Post /wp-admin/post-new.php2.06 ▼4.914.64 ▼1,323.73
Media Library /wp-admin/upload.php2.06 ▼1.244.99 ▼24.24

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_advancedrecentposts

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Most Recent Posts Mod
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.86 ▼0.166.08 ▼0.582.39 ▼0.19
Dashboard /wp-admin2,895 ▲416.09 ▼0.15120.47 ▼15.59161.72 ▼50.46
Posts /wp-admin/edit.php2,670 ▼243.24 ▼0.0067.65 ▲3.36191.29 ▲52.09
Add New Post /wp-admin/post-new.php1,690 ▲421.91 ▲2.17446.11 ▼59.46166.38 ▲5.98
Media Library /wp-admin/upload.php1,695 ▼35.48 ▲0.08149.30 ▲9.08197.73 ▲3.92

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
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/advanced-most-recent-posts-mod/adv-most-recent.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; yg_recent_posts has a deprecated constructor
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_advancedrecentposts

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 | 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-most-recent-posts-mod/adv-most-recent.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: thumbnail, recent, advanced, most recent, category posts...

advanced-most-recent-posts-mod/adv-most-recent.php 92% from 13 tests

The main PHP file in "Advanced Most Recent Posts Mod" ver. 1.6.5.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-most-recent-posts-mod.php" instead of "adv-most-recent.php")

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
Success! There were no dangerous files found in this plugin485 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14027404
PO File1343481

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity6.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.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%
Functions4
▷ Named functions4100.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
No PNG images were found in this plugin