90% instant-featured-image

Code Review | Instant Featured Image

WordPress plugin Instant Featured Image scored90%from 54 tests.

About plugin

  • Plugin page: instant-featured-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Jul 1, 2014
  • Latest release: Dec 6, 2018
  • Number of updates: 11
  • Update frequency: every 147.2 days
  • Top authors: hlashbrooke (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

200+ active /6,111 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.00MB] [CPU: ▼4.93ms] Passed 4 tests

Analyzing server-side resources used by Instant Featured Image
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.41 ▼0.74
Dashboard /wp-admin3.32 ▼0.0349.04 ▼16.18
Posts /wp-admin/edit.php3.37 ▲0.0146.52 ▼4.21
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.77 ▲5.82
Media Library /wp-admin/upload.php3.24 ▲0.0138.28 ▲1.43

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
instant_featured_image_version
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Instant Featured Image: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.48 ▲0.171.88 ▼0.1044.88 ▲1.70
Dashboard /wp-admin2,221 ▲244.89 ▼1.01107.59 ▼7.9541.55 ▼0.16
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0435.32 ▼1.0132.87 ▼2.87
Add New Post /wp-admin/post-new.php1,533 ▲722.99 ▲5.47673.57 ▲14.9954.64 ▼0.89
Media Library /wp-admin/upload.php1,400 ▲34.28 ▲0.01101.30 ▼4.9742.42 ▼5.48

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • instant_featured_image_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
2 plugin tags: post thumbnail, featured image

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

The primary PHP file in "Instant Featured Image" version 1.0.1 is used by WordPress to initiate all plugin functionality
91 characters long description:
Set an image as the featured image at the same time as you insert it into the post content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected176 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP364168125
JavaScript219050
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin