62% featured-image-pro

Code Review | Featured Image Pro Post Grid

WordPress plugin Featured Image Pro Post Grid scored 62% from 54 tests.

About plugin

  • Plugin page: featured-image-pro
  • Plugin version: 5.15
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 6, 2016
  • Latest release: Aug 16, 2023
  • Number of updates: 70
  • Update frequency: every 34.8 days
  • Top authors: nomadcoder (58.57%)seancjones (42.86%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 7,787 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.77MB] [CPU: ▼1.15ms] Passed 4 tests

An overview of server-side resources used by Featured Image Pro Post Grid
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.26 ▲0.8046.20 ▲2.93
Dashboard /wp-admin4.10 ▲0.8053.16 ▲3.77
Posts /wp-admin/edit.php4.16 ▲0.8048.79 ▼3.08
Add New Post /wp-admin/post-new.php6.64 ▲0.7687.63 ▼8.20
Media Library /wp-admin/upload.php3.96 ▲0.7340.32 ▲6.00
Featured Image Pro /wp-admin/options-general.php?page=featured-image-pro-admin3.9131.47

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 92 new files
Database: 1 new table, 7 new options
New tables
wp_proto_masonry_grids
New WordPress options
widget_featured_image_pro_masonry_widget
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Featured Image Pro Post Grid
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8414.81 ▲0.051.91 ▲0.2145.06 ▲1.39
Dashboard /wp-admin2,221 ▲335.83 ▲0.9696.14 ▼8.6040.35 ▼0.33
Posts /wp-admin/edit.php2,103 ▲142.05 ▲0.0435.61 ▼0.9033.40 ▲0.59
Add New Post /wp-admin/post-new.php1,545 ▲1123.14 ▼0.08625.83 ▲3.6257.76 ▼0.95
Media Library /wp-admin/upload.php1,403 ▲184.26 ▲0.0796.66 ▼4.3742.71 ▼11.56
Featured Image Pro /wp-admin/options-general.php?page=featured-image-pro-admin2,6462.1129.7231.89

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Zombie tables detected upon uninstall: 1 table
    • wp_proto_masonry_grids
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_featured_image_pro_masonry_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=featured-image-pro-admin
    • > Notice in wp-content/plugins/featured-image-pro/featured-image-pro-admin.php+1769
    Trying to access array offset on value of type bool

SRP 0% 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 take a closer look at the following
  • 10× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/featured-image-pro/advanced/proto_init.php
    • > /wp-content/plugins/featured-image-pro/core/functions/proto-masonry-scripts.php
    • > /wp-content/plugins/featured-image-pro/core/functions/proto-snap-category-walker.php
    • > /wp-content/plugins/featured-image-pro/core/functions/proto-widget.php
    • > /wp-content/plugins/featured-image-pro/core/functions/proto-global.php
    • > /wp-content/plugins/featured-image-pro/core/functions/proto-snap-images_03.php
    • > /wp-content/plugins/featured-image-pro/featured-image-pro-admin.php
    • > /wp-content/plugins/featured-image-pro/core/featured-image-pro-exec.php
    • > /wp-content/plugins/featured-image-pro/core/functions/proto-masonry.php
    • > /wp-content/plugins/featured-image-pro/advanced/featured-image-pro-grow.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/featured-image-pro/core-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/featured-image-pro/core/functions/featured-image-pro-notices.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/featured-image-pro/advanced/featured-image-pro-grids.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/featured-image-pro/advanced/featured-image-pro-grids.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/featured-image-pro/core/featured-image-pro-widget.php:9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/featured-image-pro/advanced/featured-image-pro-grids.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/featured-image-pro/featured-image-pro.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'featured_image_pro_image_retrieve_03' not found in wp-content/plugins/featured-image-pro/advanced/proto-media.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #5 (Getting shortcode from the widget.) image not found
You can look at the official readme.txt

featured-image-pro/featured-image-pro.php Passed 13 tests

The main PHP file in "Featured Image Pro Post Grid" ver. 5.15 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
Featured Image & Post Masonry Grid Widget & Shortcode

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
No dangerous file extensions were detected36,556 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript214,5202,55117,386
CSS181,35119011,869
PHP227872,9086,332
HTML15630575
JSON100394

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity60.89
▷ Minimum class complexity2.00
▷ Maximum class complexity273.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes15.26%
Methods301
▷ Static methods175.65%
▷ Public methods26588.04%
▷ Protected methods227.31%
▷ Private methods144.65%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/css/images/border.png0.07KB0.10KB0.00%
core/assets/css/images/magnify.png1.58KB1.28KB▼ 19.48%
advanced/assets/third-party/images/controls.png1.23KB1.28KB0.00%
advanced/assets/third-party/images/loading_background.png0.13KB0.15KB0.00%
advanced/assets/third-party/images/border.png0.07KB0.10KB0.00%