83% post-featured-image

Code Review | Post Featured Image

WordPress plugin Post Featured Image scored83%from 54 tests.

About plugin

  • Plugin page: post-featured-image
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: May 30, 2014
  • Latest release: Jun 1, 2014
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: silver530 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,118 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.71ms] Passed 4 tests

This is a short check of server-side resources used by Post Featured Image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.55 ▼0.36
Dashboard /wp-admin3.31 ▲0.0048.62 ▼3.66
Posts /wp-admin/edit.php3.36 ▲0.0048.12 ▲2.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.79 ▼8.17
Media Library /wp-admin/upload.php3.23 ▲0.0036.83 ▲1.34

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Post Featured Image
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.011.78 ▲0.1244.97 ▲2.88
Dashboard /wp-admin2,198 ▲185.59 ▼0.0493.52 ▲7.4041.98 ▲2.28
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0733.69 ▼2.6534.37 ▼1.21
Add New Post /wp-admin/post-new.php1,531 ▲323.25 ▲0.39666.81 ▲16.0553.35 ▼3.52
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.0293.07 ▼9.5043.64 ▼1.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-featured-image/post-featured-image.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Screenshots: Screenshot #1 (screenshot-1.png) image required
The official readme.txt is a good inspiration

post-featured-image/post-featured-image.php 92% from 13 tests

The principal PHP file in "Post Featured Image" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin942 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File44101,349929
PHP2132913

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.27KB7.41KB▼ 44.15%