10% recent-commented-posts

Code Review | Recent Commented Posts

WordPress plugin Recent Commented Posts scored 10% from 54 tests.

About plugin

  • Plugin page: recent-commented-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-2.8.4
  • WordPress version: 6.3.1
  • First release: Sep 6, 2009
  • Latest release: Sep 6, 2009
  • Number of updates: 7
  • Update frequency: every 199.4 days
  • Top authors: yakuphan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 3,224 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/recent-commented-posts/recent-commented-posts.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; yg_recent_commented_posts has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼50.16ms] Passed 4 tests

Server-side resources used by Recent Commented Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.328.61 ▼31.90
Dashboard /wp-admin2.16 ▼1.147.25 ▼36.14
Posts /wp-admin/edit.php2.16 ▼1.195.90 ▼41.63
Add New Post /wp-admin/post-new.php2.16 ▼3.726.98 ▼90.95
Media Library /wp-admin/upload.php2.16 ▼1.065.50 ▼29.23

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recentcommentedposts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Recent Commented Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.18 ▼1.121.71 ▼0.0843.74 ▼10.06
Dashboard /wp-admin2,206 ▲215.99 ▲0.18105.04 ▲1.7937.80 ▼5.11
Posts /wp-admin/edit.php2,089 ▼32.00 ▲0.0140.31 ▲0.4534.62 ▼1.63
Add New Post /wp-admin/post-new.php1,514 ▼1917.68 ▼5.67673.40 ▲6.0859.01 ▲13.87
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0198.21 ▼7.4544.18 ▼3.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/recent-commented-posts/recent-commented-posts.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; yg_recent_commented_posts has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recentcommentedposts
    • widget_recent-comments

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
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 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/recent-commented-posts/recent-commented-posts.php:13

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)
There were no browser issues found

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
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Widget's screenshot in 'Appearance'->'Widgets')
The official readme.txt is a good inspiration

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

This is the main PHP file of "Recent Commented Posts" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
72 characters long description:
Displays most recently commented posts with thumbnail images (optional).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin222 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12219177
PO File1172545

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.81KB6.44KB▼ 49.74%