10% author-recent-posts

Code Review | Author Recent Posts

WordPress plugin Author Recent Posts scored10%from 54 tests.

About plugin

  • Plugin page: author-recent-posts
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Apr 6, 2014
  • Latest release: Dec 10, 2020
  • Number of updates: 34
  • Update frequency: every 71.8 days
  • Top authors: amitaits (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /9,031 total downloads

Benchmarks

Plugin footprint 58% 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
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/author-recent-posts/author_recent_posts.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; authorRecentPosts has a deprecated constructor

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.89ms] Passed 4 tests

This is a short check of server-side resources used by Author Recent Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.05 ▼3.65
Dashboard /wp-admin3.32 ▲0.0154.35 ▲0.59
Posts /wp-admin/edit.php3.37 ▲0.0151.90 ▲4.51
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.83 ▲0.66
Media Library /wp-admin/upload.php3.24 ▲0.0136.28 ▼1.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_author_recent_posts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Author Recent Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.30 ▼1.075.03 ▲2.4446.50 ▲1.19
Dashboard /wp-admin2,208 ▲204.82 ▼1.02110.84 ▼9.5842.16 ▼2.06
Posts /wp-admin/edit.php2,091 ▲22.03 ▼0.0144.53 ▲7.6833.70 ▼0.14
Add New Post /wp-admin/post-new.php1,530 ▼523.15 ▼0.15642.65 ▼49.5351.86 ▼2.39
Media Library /wp-admin/upload.php1,390 ▼14.25 ▲0.01103.68 ▼13.5046.48 ▲0.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_author_recent_posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

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 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:
  • Screenshots: Add images for these screenshots: #1 (Widget options), #2 (Viewing the widget with thumbnail), #3 (Viewing the widget without thumbnail), #4 (Specify '[author]' shortcode in widget options), #5 (Viewing author name in the widget)
  • Tags: You are using too many tags: 15 tag instead of maximum 10
The official readme.txt is a good inspiration

author-recent-posts/author_recent_posts.php 85% from 13 tests

The primary PHP file in "Author Recent Posts" version 1.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 163 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("author-recent-posts.php" instead of "author_recent_posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin188 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23020168
JavaScript10016
Markdown1203
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity8.75
▷ Minimum method complexity1.00
▷ Maximum method complexity16.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png8.68KB5.58KB▼ 35.65%
screenshot-4.png11.25KB7.30KB▼ 35.09%
screenshot-3.png6.79KB4.07KB▼ 40.06%
screenshot-5.png42.60KB12.56KB▼ 70.52%
screenshot-2.png42.23KB12.42KB▼ 70.58%