10% custom-post-listing-block

Code Review | Custom post listing block

WordPress plugin Custom post listing block scored10%from 54 tests.

About plugin

  • Plugin page: custom-post-listi...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 30, 2019
  • Latest release: Jun 3, 2019
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: Kushal.Shah210 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /490 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, no array or string given

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.73ms] Passed 4 tests

Analyzing server-side resources used by Custom post listing block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.47 ▼10.51
Dashboard /wp-admin3.34 ▲0.0351.18 ▼1.23
Posts /wp-admin/edit.php3.39 ▲0.0354.75 ▲2.90
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.76 ▼13.78
Media Library /wp-admin/upload.php3.27 ▲0.0440.77 ▲2.59
All Faculty /wp-admin/edit.php?post_type=faculty3.3038.17
Add New /wp-admin/post-new.php?post_type=faculty3.4352.06

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom post listing block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,051 ▲29021.86 ▲7.4820.96 ▲18.8238.63 ▼6.14
Dashboard /wp-admin2,258 ▲787.13 ▲1.47102.17 ▲2.7744.62 ▲0.32
Posts /wp-admin/edit.php2,184 ▲846.58 ▲4.5759.35 ▲22.8838.14 ▼0.16
Add New Post /wp-admin/post-new.php6,377 ▲4,85126.75 ▲3.44814.28 ▲182.4141.51 ▼13.46
Media Library /wp-admin/upload.php1,482 ▲798.72 ▲4.35119.67 ▲13.7255.54 ▲8.50
All Faculty /wp-admin/edit.php?post_type=faculty1,1536.5552.4329.01
Add New /wp-admin/post-new.php?post_type=faculty2,67013.33206.5770.80

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

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

custom-post-listing-block/e-learning-faculty.php 92% from 13 tests

The principal PHP file in "Custom post listing block" v. 1.0.0 is loaded by WordPress automatically on each request
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-post-listing-block.php" instead of "e-learning-faculty.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 plugin2,621 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS41932712,432
PHP21124131
JavaScript143158

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin