89% preload-featured-images

Code Review | Preload Featured Images

WordPress plugin Preload Featured Images scored 89% from 54 tests.

About plugin

  • Plugin page: preload-featured-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 29, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 7
  • Update frequency: every 110.3 days
  • Top authors: WPZOOM (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 7,282 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.54ms] Passed 4 tests

Server-side resources used by Preload Featured Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.87 ▼6.33
Dashboard /wp-admin3.35 ▲0.0544.54 ▼4.04
Posts /wp-admin/edit.php3.40 ▲0.0447.38 ▼1.88
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.13 ▲2.67
Media Library /wp-admin/upload.php3.27 ▲0.0434.17 ▼1.89
Preload Featured Images /wp-admin/options-general.php?page=preload-featured-images3.2430.35

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Preload Featured Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.54 ▼0.891.76 ▲0.0140.17 ▼3.57
Dashboard /wp-admin2,210 ▲225.85 ▼0.2097.48 ▼10.2838.71 ▼2.54
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0340.30 ▼0.7836.31 ▼0.23
Add New Post /wp-admin/post-new.php1,536 ▲223.38 ▼0.03620.67 ▼38.8651.42 ▲6.87
Media Library /wp-admin/upload.php1,392 ▲44.19 ▲0.0096.84 ▲2.1541.41 ▼0.54
Preload Featured Images /wp-admin/options-general.php?page=preload-featured-images8232.0623.5226.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • preload_featured_images_option_name

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (Settings Page) image not found
Please take inspiration from this readme.txt

preload-featured-images/preload-featured-image.php 92% from 13 tests

The entry point to "Preload Featured Images" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("preload-featured-images.php" instead of "preload-featured-image.php")

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
Everything looks great! No dangerous files found in this plugin194 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP259109175
Markdown112019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png73.03KB20.76KB▼ 71.57%