84% latest-posts-block

Code Review | Latest Posts Block

WordPress plugin Latest Posts Block scored84%from 54 tests.

About plugin

  • Plugin page: latest-posts-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2023
  • Latest release: Jun 13, 2023
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: ashathemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /92 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Latest Posts Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.63 ▲1.24
Dashboard /wp-admin3.32 ▲0.0146.64 ▼2.83
Posts /wp-admin/edit.php3.37 ▲0.0147.25 ▼8.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.30 ▼16.04
Media Library /wp-admin/upload.php3.24 ▲0.0141.82 ▲6.16

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Latest Posts Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲614.37 ▲0.011.73 ▼0.3543.28 ▼1.79
Dashboard /wp-admin2,195 ▲185.64 ▲0.0490.07 ▼13.3939.12 ▼9.05
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0638.39 ▲0.9835.00 ▼1.72
Add New Post /wp-admin/post-new.php6,366 ▲4,84027.52 ▲3.98929.18 ▲266.9760.05 ▲7.26
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.03100.09 ▼12.2844.77 ▼1.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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 everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/latest-posts-block/plugin.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: gutenberg blocks, latest posts, latest posts block, gutenberg, block

latest-posts-block/plugin.php 85% from 13 tests

Analyzing the main PHP file in "Latest Posts Block" version 1.0.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("latest-posts-block.php" instead of "plugin.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("6.0" instead of "5.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin508 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45799365
Sass27039
PHP282336
CSS20834
JSON10034

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin