79% nelio-featured-posts

Code Review | Nelio Featured Posts

WordPress plugin Nelio Featured Posts scored79%from 54 tests.

About plugin

  • Plugin page: nelio-featured-posts
  • Plugin version: 2.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.3
  • WordPress version: 6.3.1
  • First release: Sep 19, 2014
  • Latest release: Nov 29, 2019
  • Number of updates: 45
  • Update frequency: every 52.5 days
  • Top authors: nelio (77.78%)davilera (24.44%)

Code review

54 tests

User reviews

9 reviews

Install metrics

700+ active /22,885 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.90ms] Passed 4 tests

Analyzing server-side resources used by Nelio Featured Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.66 ▼0.53
Dashboard /wp-admin3.40 ▲0.0553.29 ▼13.36
Posts /wp-admin/edit.php3.51 ▲0.1651.97 ▼1.96
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.15 ▼19.75
Media Library /wp-admin/upload.php3.32 ▲0.0940.12 ▲1.40
Featured by Nelio /wp-admin/edit.php?page=neliofp-settings3.2731.00

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

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

Browser metrics Passed 4 tests

Nelio Featured Posts: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲8514.35 ▼0.031.91 ▲0.3345.25 ▲0.44
Dashboard /wp-admin2,220 ▲405.63 ▼0.0386.08 ▼10.7546.66 ▲2.20
Posts /wp-admin/edit.php2,132 ▲321.98 ▼0.0136.50 ▼4.4145.01 ▲6.10
Add New Post /wp-admin/post-new.php1,556 ▲3023.28 ▲0.03705.93 ▲9.3269.93 ▲16.44
Media Library /wp-admin/upload.php1,428 ▲254.11 ▼0.07105.26 ▲2.0847.26 ▲0.66
Featured by Nelio /wp-admin/edit.php?page=neliofp-settings9392.4443.9933.41

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_neliofp_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?page=neliofp-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?page=neliofp-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/nelio-featured-posts/nelio-featured-posts.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nelio-featured-posts/includes/admin/nelioab-campaign.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/nelio-featured-posts/template-examples/title-and-featured-image.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nelio-featured-posts/includes/widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/nelio-featured-posts/includes/featured-post-template.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/nelio-featured-posts/template-examples/title-only.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/nelio-featured-posts/includes/admin/settings-page.php:236

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: relevant post, starred post, manual relevant post, manual featured posts, featured post...

nelio-featured-posts/nelio-featured-posts.php Passed 13 tests

The main PHP script in "Nelio Featured Posts" version 2.2.4 is automatically included on every request by WordPress
101 characters long description:
Select the featured posts you want to show at any time and include them in your theme using a widget.

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 plugin3,630 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45583822,610
PHP10122109577
CSS8513255
JSON500116
Markdown127072

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.33
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods16
▷ Static methods531.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/lib/select2-3.5.0/select2x2.png0.83KB0.77KB▼ 6.15%
assets/images/feat-image-placeholder-hover.png0.65KB0.34KB▼ 48.58%
assets/images/feat-image-placeholder.png0.50KB0.23KB▼ 54.01%
assets/noimage.png4.11KB2.17KB▼ 47.14%
assets/admin/lib/select2-3.5.0/select2.png0.60KB0.99KB0.00%