84% recent-post-listing

Code Review | WordPress Recent Block Listing - Gutenberg Block

WordPress plugin WordPress Recent Block Listing - Gutenberg Block scored84%from 54 tests.

About plugin

  • Plugin page: recent-post-listing
  • Plugin version: 1.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Apr 22, 2022
  • Latest release: Apr 22, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: shahshreya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /187 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.47ms] Passed 4 tests

Analyzing server-side resources used by WordPress Recent Block Listing - Gutenberg Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.01 ▼0.02
Dashboard /wp-admin3.32 ▲0.0249.36 ▼5.65
Posts /wp-admin/edit.php3.37 ▲0.0249.81 ▼0.95
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.21 ▼27.25
Media Library /wp-admin/upload.php3.24 ▲0.0238.09 ▲2.08

Server storage [IO: ▲1.21MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/recent-post-listing/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Recent Block Listing - Gutenberg Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5613.25 ▼1.131.90 ▲0.2742.21 ▼0.97
Dashboard /wp-admin2,221 ▲214.87 ▼0.16113.01 ▼2.5438.82 ▼15.22
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0339.93 ▲0.6037.90 ▲5.18
Add New Post /wp-admin/post-new.php6,196 ▲4,67018.76 ▲0.96938.07 ▲267.5964.93 ▲16.23
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.05100.69 ▼0.4459.41 ▲14.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recent-post-listing/plugin.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: gutenberg plugin, guternblock block, wordpres plugin, recent posts, recent post block plugin

recent-post-listing/plugin.php 92% from 13 tests

"WordPress Recent Block Listing - Gutenberg Block" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("recent-post-listing.php" instead of "plugin.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
Good job! No executable or dangerous file extensions detected33,032 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JSON20032,678
JavaScript21752226
PHP213889
CSS11039

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.25
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%
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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/No-image-available.png3.06KB2.93KB▼ 4.09%