94% featured-image-checker

Code Review | Featured Image Checker

WordPress plugin Featured Image Checker scored 94% from 53 tests.

About plugin

  • Plugin page: featured-image-ch...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.8.1
  • First release: Mar 7, 2015
  • Latest release: Mar 7, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: spgandhi (100%)

Code review

53 tests

User reviews

1 review

Install metrics

20+ active / 1,044 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼312.35ms] Passed 4 tests

Server-side resources used by Featured Image Checker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1230.85 ▲1.88
Dashboard /wp-admin3.06 ▲0.0133.69 ▼14.36
Posts /wp-admin/edit.php3.01 ▼0.1031.61 ▼11.41
Add New Post /wp-admin/post-new.php5.42 ▼0.0195.05 ▼1,218.90
Media Library /wp-admin/upload.php3.00 ▼0.0032.49 ▼4.72

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Featured Image Checker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲9615.96 ▲0.498.01 ▲0.4749.40 ▲1.41
Dashboard /wp-admin2,962 ▲1125.89 ▼0.08139.06 ▼13.86100.30 ▼13.94
Posts /wp-admin/edit.php2,719 ▲132.68 ▼0.0264.03 ▲0.1282.72 ▼2.44
Add New Post /wp-admin/post-new.php1,653 ▼20018.79 ▼0.22365.78 ▼6.10107.05 ▼3.43
Media Library /wp-admin/upload.php1,775 ▲625.01 ▲0.03146.15 ▼2.05112.88 ▲3.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.72MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/featured-image-checker/featured-image-checker.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: featured image check, featured image

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

The main PHP script in "Featured Image Checker" version 1.0.0 is automatically included on every request by WordPress
116 characters long description:
This plugin checks if the post has a featured image set or not. It displays yes/no on the posts page on the backend.

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

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin