84% list-custom-post-with-featured-image

Code Review | List Custom Post with featured image

WordPress plugin List Custom Post with featured image scored84%from 54 tests.

About plugin

  • Plugin page: list-custom-post-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Feb 11, 2017
  • Latest release: Aug 20, 2023
  • Number of updates: 36
  • Update frequency: every 66.2 days
  • Top authors: devikas301 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,088 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Server-side resources used by List Custom Post with featured image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0231.96 ▼9.41
Dashboard /wp-admin3.32 ▲0.0244.41 ▼5.29
Posts /wp-admin/edit.php3.37 ▲0.0246.34 ▼3.97
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.64 ▼8.93
Media Library /wp-admin/upload.php3.25 ▲0.0236.47 ▲3.15

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

List Custom Post with featured image: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.66 ▲0.471.62 ▼0.1239.71 ▼8.54
Dashboard /wp-admin2,192 ▲185.54 ▲0.0187.09 ▼14.6141.23 ▼8.25
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0734.60 ▼2.4131.53 ▼0.79
Add New Post /wp-admin/post-new.php1,526 ▼223.16 ▲0.16630.29 ▼37.3551.33 ▼7.18
Media Library /wp-admin/upload.php1,397 ▼34.40 ▲0.21104.58 ▼5.7946.21 ▼5.41

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/list-custom-post-with-featured-image/list-cp-featured-image.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Gallery page in the front-end.), #2 (Showing shortcode on plugin section back-end.), #3 (Using shortcode on back-end & same as its working with phpcode using do_shortcode().)
You can look at the official readme.txt

list-custom-post-with-featured-image/list-cp-featured-image.php 92% from 13 tests

"List Custom Post with featured image" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("list-custom-post-with-featured-image.php" instead of "list-cp-featured-image.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected108 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2241799
CSS1009

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/default-placeholder.png16.06KB8.22KB▼ 48.84%
screenshot-1.png76.94KB21.71KB▼ 71.78%
screenshot-2.png19.46KB7.09KB▼ 63.55%
screenshot-3.png21.88KB7.81KB▼ 64.32%