84% bulk-featured-image

Code Review | Bulk Featured Image

WordPress plugin Bulk Featured Image scored 84% from 54 tests.

About plugin

  • Plugin page: bulk-featured-image
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 5.8.1
  • First release: May 22, 2021
  • Latest release: May 22, 2021
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: creedally (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 188 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼140.55ms] Passed 4 tests

Server-side resources used by Bulk Featured Image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.1737.48 ▲3.62
Dashboard /wp-admin3.29 ▲0.2344.87 ▼0.60
Posts /wp-admin/edit.php3.34 ▲0.2348.03 ▲8.45
Add New Post /wp-admin/post-new.php5.60 ▲0.1691.87 ▼563.87
Media Library /wp-admin/upload.php3.17 ▲0.1633.26 ▼1.33

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 1 new option
New WordPress options
bfi_settings

Browser metrics Passed 4 tests

Bulk Featured Image: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲11316.09 ▲0.647.50 ▼0.9147.57 ▼3.71
Dashboard /wp-admin3,003 ▲726.17 ▲0.07142.35 ▼7.35111.91 ▼2.94
Posts /wp-admin/edit.php2,766 ▲272.72 ▲0.0267.40 ▲2.9393.92 ▲10.88
Add New Post /wp-admin/post-new.php1,911 ▲3516.10 ▼3.10393.80 ▲27.36104.50 ▼8.89
Media Library /wp-admin/upload.php1,840 ▲335.39 ▲0.37158.31 ▲9.81114.27 ▼15.00

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • bfi_settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bulk-featured-image/admin/class-bfi-list-table.php on line 3
    • > 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/bulk-featured-image/admin/class-bfi-list-table.php on line 3
    • > 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/bulk-featured-image/admin/class-bfi-list-table.php on line 3

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: thumbnails, post-thumbnail

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

"Bulk Featured Image" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
28 characters long description:
Bulk Featured images update.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin916 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10311229852
JavaScript27337
CSS30627

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity26.33
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods48
▷ Static methods510.42%
▷ Public methods4389.58%
▷ Protected methods00.00%
▷ Private methods510.42%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/menu-icon.png0.72KB0.71KB▼ 1.63%