99% amp-recent-posts-widget

Code Review | AMP Recent Posts widget

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

About plugin

  • Plugin page: amp-recent-posts-...
  • Plugin version: 1.3
  • 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: 22
  • Update frequency: every 7.7 days
  • Top authors: nmvdvjr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,050 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by AMP Recent Posts widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0452.83 ▲6.39
Dashboard /wp-admin3.44 ▲0.0333.17 ▲0.68
Posts /wp-admin/edit.php3.67 ▲0.0337.08 ▲0.48
Add New Post /wp-admin/post-new.php6.91 ▼0.0693.53 ▼1,166.60
Media Library /wp-admin/upload.php3.32 ▲0.0324.57 ▼0.84

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by AMP Recent Posts widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.92 ▼0.087.36 ▲1.282.83 ▲0.24
Dashboard /wp-admin2,895 ▲376.15 ▼0.04116.27 ▼29.61155.04 ▼12.80
Posts /wp-admin/edit.php2,691 ▼33.23 ▲0.0063.27 ▲1.07140.45 ▼0.07
Add New Post /wp-admin/post-new.php1,717 ▼4321.05 ▼0.98449.75 ▲34.62154.13 ▼4.90
Media Library /wp-admin/upload.php1,698 ▼35.47 ▼0.08135.74 ▼19.62186.04 ▼4.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: You can take inspiration from this readme.txt

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

This is the main PHP file of "AMP Recent Posts widget" version 1.3, 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: Please rename the main PHP file in this plugin to the plugin slug ("amp-recent-posts-widget.php" instead of "AMP Recent Posts widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected80 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1307180

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity13.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin