99% amp-recent-posts

Code Review | AMP Recent Posts

WordPress plugin AMP Recent Posts scored 99% from 54 tests.

About plugin

  • Plugin page: amp-recent-posts
  • Plugin version: 3.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.7
  • WordPress version: 5.9.2
  • First release: Jul 4, 2016
  • Latest release: Dec 20, 2016
  • Number of updates: 89
  • Update frequency: every 1.9 days
  • Top authors: nmvdvjr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,999 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼288.13ms] Passed 4 tests

Analyzing server-side resources used by AMP Recent Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.4556.41 ▲29.92
Dashboard /wp-admin3.47 ▲0.0637.81 ▲4.53
Posts /wp-admin/edit.php3.70 ▲0.0640.45 ▲3.29
Add New Post /wp-admin/post-new.php6.94 ▼0.02100.14 ▼1,157.60
Media Library /wp-admin/upload.php3.35 ▲0.0524.03 ▼2.74

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AMP Recent Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲6116.18 ▲0.586.05 ▼1.802.00 ▼0.30
Dashboard /wp-admin2,911 ▲506.12 ▲0.06121.90 ▼10.22178.51 ▲18.79
Posts /wp-admin/edit.php2,677 ▼143.12 ▼0.1165.53 ▲0.85140.80 ▼3.02
Add New Post /wp-admin/post-new.php1,674 ▲1316.54 ▲1.02404.71 ▼12.48189.05 ▲31.27
Media Library /wp-admin/upload.php1,715 ▲205.54 ▲0.03125.60 ▼17.36205.84 ▲16.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests Passed 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 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
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: amp, recent posts

amp-recent-posts/AMP Recent Posts.php 85% from 13 tests

This is the main PHP file of "AMP Recent Posts" version 3.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("amp-recent-posts.php" instead of "AMP Recent Posts.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 198 characters long)

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
Good job! No executable or dangerous file extensions detected1 line of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1001

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 complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.18KB0.91KB▼ 23.06%