83% wp-featured-news-custom-posts-listing-elements

Code Review | WP Featured News - Custom Posts Listing Elements

WordPress plugin WP Featured News - Custom Posts Listing Elements scored83%from 54 tests.

About plugin

  • Plugin page: wp-featured-news-...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.2
  • WordPress version: 6.3.1
  • First release: Sep 8, 2019
  • Latest release: Nov 27, 2021
  • Number of updates: 24
  • Update frequency: every 33.8 days
  • Top authors: reader87 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /1,101 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.62MB] [CPU: ▼7.63ms] Passed 4 tests

An overview of server-side resources used by WP Featured News - Custom Posts Listing Elements
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6244.62 ▲1.50
Dashboard /wp-admin3.92 ▲0.6252.29 ▼8.74
Posts /wp-admin/edit.php4.03 ▲0.6851.19 ▼1.62
Add New Post /wp-admin/post-new.php6.52 ▲0.6390.14 ▼21.66
Media Library /wp-admin/upload.php3.84 ▲0.6141.87 ▲4.30

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Featured News - Custom Posts Listing Elements
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17013.58 ▼0.7012.24 ▲10.3473.70 ▲26.51
Dashboard /wp-admin2,215 ▲405.56 ▼0.1087.11 ▼17.8142.43 ▼4.64
Posts /wp-admin/edit.php2,120 ▲202.00 ▼0.0139.29 ▲4.0332.61 ▼3.43
Add New Post /wp-admin/post-new.php1,551 ▲2218.37 ▼4.78622.20 ▼15.4766.77 ▲3.77
Media Library /wp-admin/upload.php1,417 ▲204.24 ▼0.0499.23 ▼1.7841.97 ▼4.64

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2283× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: unique_css_class in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p6/block_6_css.php on line 385
    • > PHP Notice
      Undefined variable: current_time in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p7/blockcolor.php on line 108
    • > PHP Notice
      Undefined variable: unique_css_class in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p1/block_1_css.php on line 21
    • > PHP Notice
      Undefined variable: current_time in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p8/blockcolor.php on line 50
    • > PHP Notice
      Undefined variable: blockdatecolor in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p4/blockdatecolor.php on line 4
    • > PHP Notice
      Undefined variable: current_time in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p3/blockbackgroundcolor.php on line 3
    • > PHP Notice
      Undefined variable: current_time in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p2/sm_post_title_color.php on line 3
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p10/block_10_css.php on line 205
    • > PHP Notice
      Undefined variable: current_time in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p7/blockcolor.php on line 75
    • > PHP Notice
      Undefined variable: unique_css_class in wp-content/plugins/wp-featured-news-custom-posts-listing-elements/modules/p1/block_1_css.php on line 149

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

wp-featured-news-custom-posts-listing-elements/index.php 85% from 13 tests

The primary PHP file in "WP Featured News - Custom Posts Listing Elements" version 1.3.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-featured-news-custom-posts-listing-elements.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin27,757 lines of code in 200 files:
LanguageFilesBlank linesComment linesLines of code
PHP1871,42247915,425
SVG40129,065
CSS51,415223,190
JavaScript4151477

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
55 PNG files occupy 0.11MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/images/block_7.png0.82KB1.00KB0.00%
modules/images/block_9.png3.12KB2.13KB▼ 31.81%
modules/images/rss-icon.png3.67KB0.83KB▼ 77.48%
modules/images/block_11.png1.33KB1.37KB0.00%
modules/images/list_style.png1.94KB1.56KB▼ 19.79%