72% most-recent-posts

Code Review | Most Recent Posts

WordPress plugin Most Recent Posts scored72%from 54 tests.

About plugin

  • Plugin page: most-recent-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2013
  • Latest release: Jun 8, 2013
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: vaughnbullard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,511 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.70ms] Passed 4 tests

This is a short check of server-side resources used by Most Recent Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.78 ▼2.01
Dashboard /wp-admin3.37 ▲0.0752.08 ▼2.75
Posts /wp-admin/edit.php3.42 ▲0.0748.24 ▼1.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0787.57 ▼12.61
Media Library /wp-admin/upload.php3.30 ▲0.0738.49 ▲0.51
Shortcode /wp-admin/admin.php?page=MRPShortcodes3.2640.57
Tech Support /wp-admin/admin.php?page=MRPTechSupport3.2635.63
Most Recent Posts /wp-admin/admin.php?page=MostRecentPostsSettings3.2634.65
Registration /wp-admin/admin.php?page=MRPRegistration3.2635.85
Help /wp-admin/admin.php?page=MRPHelp3.2638.14

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Most Recent Posts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.72 ▲0.431.60 ▼0.3743.67 ▼1.22
Dashboard /wp-admin2,236 ▲565.56 ▼0.0790.75 ▲0.0675.97 ▲35.79
Posts /wp-admin/edit.php2,141 ▲412.00 ▲0.0535.78 ▼0.7531.70 ▼5.38
Add New Post /wp-admin/post-new.php1,578 ▲5223.28 ▲0.04722.41 ▲24.4957.83 ▼3.19
Media Library /wp-admin/upload.php1,444 ▲414.16 ▼0.09101.48 ▼6.4283.93 ▲37.21
Shortcode /wp-admin/admin.php?page=MRPShortcodes9751.9925.0729.35
Tech Support /wp-admin/admin.php?page=MRPTechSupport8271.9926.4428.27
Most Recent Posts /wp-admin/admin.php?page=MostRecentPostsSettings8782.0523.6727.62
Registration /wp-admin/admin.php?page=MRPRegistration8992.0025.2325.84
Help /wp-admin/admin.php?page=MRPHelp1,4918.37217.4363.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/most-recent-posts/most-recent-posts.php
    • > /wp-content/plugins/most-recent-posts/trunk/most-recent-posts.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/most-recent-posts/trunk/most-recent-posts-widget.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/most-recent-posts/most-recent-posts-widget.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=MRPHelp
    • > Network (severe)
    http://buildautomate.com/favicon.ico - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=MostRecentPostsSettings
    • > Network (severe)
    http://i1.wp.com/www.buildautomate.com/en/wp-content/uploads/2013/04/8.png?resize=300%2C50 - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

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 need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Widget Display), #2 (Shortcode embedded in Page), #3 (Widget User Interface Configuration), #4 (Shortcode Example), #5 (Screenshot of Plugin Live on Build.Automate website), #6 (Screenshot of possible shortcode attributes, their attributes and possible values)
You can look at the official readme.txt

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

The principal PHP file in "Most Recent Posts" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 223 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,161 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP61481181,161

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity11.00
▷ Minimum class complexity2.00
▷ Maximum class complexity20.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods642.86%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.64MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/screenshot-3.png53.46KB15.01KB▼ 71.91%
trunk/screenshot-6.png86.91KB24.62KB▼ 71.68%
trunk/screenshot-1.png17.70KB4.67KB▼ 73.60%
trunk/screenshot-2.png24.50KB6.75KB▼ 72.44%
trunk/screenshot-4.png18.61KB4.82KB▼ 74.11%