90% recent-posts-block

Code Review | Recent Posts block

WordPress plugin Recent Posts block scored90%from 54 tests.

About plugin

  • Plugin page: recent-posts-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 18, 2020
  • Latest release: Mar 19, 2020
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: brijeshdhanani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Recent Posts block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.61 ▲1.64
Dashboard /wp-admin3.32 ▲0.0246.92 ▼3.84
Posts /wp-admin/edit.php3.37 ▲0.0247.59 ▼3.87
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.85 ▼12.09
Media Library /wp-admin/upload.php3.24 ▲0.0235.48 ▼1.70

Server storage [IO: ▲0.01MB] [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, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Recent Posts block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.29 ▼0.061.92 ▲0.3344.85 ▲4.48
Dashboard /wp-admin2,192 ▲125.56 ▼0.0982.69 ▼3.6838.68 ▼3.82
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0033.12 ▼1.4335.31 ▲1.15
Add New Post /wp-admin/post-new.php6,206 ▲4,68021.47 ▼1.71885.58 ▲239.3672.45 ▲18.39
Media Library /wp-admin/upload.php1,403 ▲124.30 ▲0.0994.35 ▼7.8942.23 ▼0.57

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: gutenberg, recent posts, block

recent-posts-block/plugin.php 92% from 13 tests

The main PHP script in "Recent Posts block" version 1.0.0 is automatically included on every request by WordPress
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 ("recent-posts-block.php" instead of "plugin.php")

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
There were no executable files found in this plugin80 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2115879
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin