84% automatic-featured-image-posts

Code Review | Automatic Featured Image Posts

WordPress plugin Automatic Featured Image Posts scored84%from 54 tests.

About plugin

  • Plugin page: automatic-feature...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.7
  • WordPress version: 6.3.1
  • First release: Dec 10, 2011
  • Latest release: Nov 2, 2013
  • Number of updates: 28
  • Update frequency: every 24.8 days
  • Top authors: jeremyfelt (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

600+ active /53,848 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.31ms] Passed 4 tests

Server-side resources used by Automatic Featured Image Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.83 ▼2.01
Dashboard /wp-admin3.37 ▲0.0745.61 ▼4.33
Posts /wp-admin/edit.php3.42 ▲0.0746.83 ▼4.15
Add New Post /wp-admin/post-new.php5.95 ▲0.0795.64 ▲4.32
Media Library /wp-admin/upload.php3.29 ▲0.0736.55 ▼2.74
Auto Image Posts /wp-admin/options-general.php?page=automatic-featured-image-posts-settings3.2632.74

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
afip_upgrade_check
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
afip_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Automatic Featured Image Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▲0.021.68 ▼0.0044.14 ▲0.40
Dashboard /wp-admin2,199 ▲225.60 ▼0.0684.35 ▼6.9438.66 ▲3.73
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0039.54 ▲3.2334.74 ▼1.50
Add New Post /wp-admin/post-new.php1,529 ▲123.01 ▼0.05674.60 ▼2.1956.22 ▼8.64
Media Library /wp-admin/upload.php1,401 ▲14.18 ▼0.0897.11 ▼6.5241.75 ▼3.06
Auto Image Posts /wp-admin/options-general.php?page=automatic-featured-image-posts-settings9421.9922.8427.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/automatic-featured-image-posts/automatic-featured-image-posts.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: Screenshot #1 (An overview of the Automatic Featured Image Posts settings screen.) image not found
The official readme.txt is a good inspiration

automatic-featured-image-posts/automatic-featured-image-posts.php Passed 13 tests

The main PHP file in "Automatic Featured Image Posts" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
89 characters long description:
Automatically creates a new post with an assigned featured image from every image upload.

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 plugin206 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP259135206

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin