84% posts-list-block

Code Review | Posts List Block

WordPress plugin Posts List Block scored84%from 54 tests.

About plugin

  • Plugin page: posts-list-block
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: May 19, 2019
  • Latest release: May 28, 2019
  • Number of updates: 7
  • Update frequency: every 1.3 days
  • Top authors: obenland (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,426 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
Installer ran successfully

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

An overview of server-side resources used by Posts List Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.63 ▼2.91
Dashboard /wp-admin3.31 ▲0.0145.84 ▲0.26
Posts /wp-admin/edit.php3.36 ▲0.0146.83 ▼3.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.15 ▲2.13
Media Library /wp-admin/upload.php3.23 ▲0.0136.34 ▲2.59

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Posts List Block: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.23 ▼1.021.90 ▲0.0141.09 ▼2.67
Dashboard /wp-admin2,206 ▲185.89 ▲0.9994.63 ▼22.5237.41 ▼5.04
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0540.79 ▼0.2334.88 ▼1.26
Add New Post /wp-admin/post-new.php6,180 ▲4,66619.26 ▲1.34907.56 ▲302.6857.95 ▲11.90
Media Library /wp-admin/upload.php1,388 ▲64.20 ▼0.0294.38 ▼0.3242.41 ▲0.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-list-block/posts-list-block.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function a8c_pl_render_template() in wp-content/plugins/posts-list-block/posts-list-block/templates/posts-list.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/posts-list-block/posts-list-block/templates/no-posts.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/posts-list-block/posts-list-block/templates/post-item.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: gutenberg, block, editor, blog, blocks

posts-list-block/posts-list-block.php Passed 13 tests

The main file in "Posts List Block" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
74 characters long description:
A block to display a list of your latest posts, similar to your blog page.

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
There were no executable files found in this plugin255 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP639101182
JavaScript33953
JSON20011
Sass1108
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin