10% category-recent-posts-widget

Code Review | Categories Recent Posts Widget

WordPress plugin Categories Recent Posts Widget scored10%from 54 tests.

About plugin

  • Plugin page: category-recent-p...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2012
  • Latest release: Jan 25, 2014
  • Number of updates: 29
  • Update frequency: every 16.7 days
  • Top authors: themedios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /7,425 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/category-recent-posts-widget/tm_category_recent_posts.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; tm_Category_Recent_Posts_Widget has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼53.72ms] Passed 4 tests

This is a short check of server-side resources used by Categories Recent Posts Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.39 ▼38.73
Dashboard /wp-admin2.11 ▼1.197.00 ▼37.39
Posts /wp-admin/edit.php2.11 ▼1.255.18 ▼45.05
Add New Post /wp-admin/post-new.php2.11 ▼3.784.97 ▼93.71
Media Library /wp-admin/upload.php2.11 ▼1.126.09 ▼27.37

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Categories Recent Posts Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.341.70 ▼0.3242.72 ▲0.48
Dashboard /wp-admin2,206 ▲185.88 ▲0.99102.84 ▼2.4539.87 ▼0.39
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0139.12 ▼1.8233.08 ▼1.43
Add New Post /wp-admin/post-new.php1,533 ▼1123.22 ▲4.71648.67 ▲35.6060.73 ▲10.41
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.0495.98 ▼7.5543.29 ▼0.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/category-recent-posts-widget/tm_category_recent_posts.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; tm_Category_Recent_Posts_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_tm-cat-recent-post-widget
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/category-recent-posts-widget/tm_category_recent_posts.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Widget appearing in a sidebar on a category archive page), #2 (Widget settings option in the Dashboard)
You can take inspiration from this readme.txt

category-recent-posts-widget/tm_category_recent_posts.php 92% from 13 tests

"Categories Recent Posts Widget" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("category-recent-posts-widget.php" instead of "tm_category_recent_posts.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 plugin81 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.28MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png194.28KB79.64KB▼ 59.01%
screenshot-2.png97.47KB41.34KB▼ 57.59%