89% custom-posts-list-block

Code Review | Custom Posts List Block

WordPress plugin Custom Posts List Block scored89%from 54 tests.

About plugin

  • Plugin page: custom-posts-list...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 6, 2023
  • Latest release: Jan 6, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: chintanmakwana7413 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /132 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
This plugin's installer ran successfully

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

Server-side resources used by Custom Posts List Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0339.61 ▼1.95
Dashboard /wp-admin3.37 ▼0.0147.97 ▼16.77
Posts /wp-admin/edit.php3.42 ▲0.0347.69 ▼1.83
Add New Post /wp-admin/post-new.php5.95 ▲0.0383.39 ▼25.61
Media Library /wp-admin/upload.php3.29 ▲0.0334.89 ▼5.34

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Custom Posts List Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.70 ▼0.884.00 ▲2.3839.88 ▼3.53
Dashboard /wp-admin2,203 ▲125.81 ▲0.8898.87 ▼1.7540.49 ▼2.00
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0034.14 ▼4.8931.80 ▼3.22
Add New Post /wp-admin/post-new.php6,188 ▲4,67418.98 ▲1.34834.86 ▲123.4952.29 ▲2.99
Media Library /wp-admin/upload.php1,385 ▼64.18 ▼0.0393.07 ▼7.6842.19 ▼5.71

Uninstaller [IO: ✅] [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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Block Edit Section), #2 (Block Edit Setting), #3 (Block Layout)
  • Requires at least: Version not formatted correctly
  • Requires php: Version not formatted correctly
Please take inspiration from this readme.txt

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

The primary PHP file in "Custom Posts List Block" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-posts-list-block.php" instead of "plugin.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 detected7,644 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,257
JavaScript32653197
PHP22758129
Sass311259
CSS2002

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.32
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

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