84% easy-featured-images

Code Review | Easy Featured Images

WordPress plugin Easy Featured Images scored84%from 54 tests.

About plugin

  • Plugin page: easy-featured-images
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.2
  • WordPress version: 6.3.1
  • First release: Mar 14, 2015
  • Latest release: May 5, 2015
  • Number of updates: 14
  • Update frequency: every 3.8 days
  • Top authors: danielpataki (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /8,965 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.06ms] Passed 4 tests

Analyzing server-side resources used by Easy Featured Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.39 ▼7.70
Dashboard /wp-admin3.34 ▲0.0345.11 ▼6.60
Posts /wp-admin/edit.php3.48 ▲0.1251.02 ▲5.90
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.62 ▼9.09
Media Library /wp-admin/upload.php3.26 ▲0.0336.70 ▲3.16

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Easy Featured Images: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.54 ▼0.861.62 ▼0.4036.79 ▼5.62
Dashboard /wp-admin2,209 ▲214.85 ▼0.04107.40 ▼8.0044.83 ▼1.63
Posts /wp-admin/edit.php2,280 ▲1913.48 ▲1.4596.91 ▲61.4636.37 ▲3.01
Add New Post /wp-admin/post-new.php1,538 ▲923.13 ▲5.06625.80 ▼14.6251.86 ▲3.60
Media Library /wp-admin/upload.php1,385 ▲64.19 ▲0.0277.93 ▼23.8642.41 ▲1.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-featured-images/class-easy-featured-images.php:50

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: ajax, featured images, media

easy-featured-images/easy-featured-images.php Passed 13 tests

The principal PHP file in "Easy Featured Images" v. 1.2.0 is loaded by WordPress automatically on each request
120 characters long description:
Adds featured images to the admin post lists and allows you to add and modify them without loading the post's edit page.

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
There were no executable files found in this plugin271 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1241879
PHP24112476
CSS18861
PO File281655

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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
No PNG files were detected