84% featured-image-extended

Code Review | Featured Image Extended

WordPress plugin Featured Image Extended scored84%from 54 tests.

About plugin

  • Plugin page: featured-image-ex...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 26, 2018
  • Latest release: Jun 28, 2018
  • Number of updates: 11
  • Update frequency: every 0.5 days
  • Top authors: enrico.sorcinelli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /780 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.93ms] Passed 4 tests

Server-side resources used by Featured Image Extended
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.21 ▼7.35
Dashboard /wp-admin3.42 ▲0.1245.28 ▼4.55
Posts /wp-admin/edit.php3.54 ▲0.1846.14 ▼2.25
Add New Post /wp-admin/post-new.php6.02 ▲0.1494.12 ▼1.58
Media Library /wp-admin/upload.php3.34 ▲0.1138.31 ▲3.05
Featured Image Extended /wp-admin/options-general.php?page=featured_image_extended_general_settings3.3633.49

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Featured Image Extended
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.26 ▼1.351.69 ▼0.2438.57 ▼3.87
Dashboard /wp-admin2,204 ▲195.82 ▲0.90107.08 ▼28.2344.88 ▼4.47
Posts /wp-admin/edit.php2,103 ▲142.05 ▲0.0342.07 ▼2.2236.54 ▼0.35
Add New Post /wp-admin/post-new.php1,529 ▲723.03 ▼0.26671.31 ▼10.5568.38 ▲2.78
Media Library /wp-admin/upload.php1,395 ▲104.29 ▲0.0995.31 ▼7.9242.93 ▼0.04
Featured Image Extended /wp-admin/options-general.php?page=featured_image_extended_general_settings9992.0929.6129.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/featured-image-extended/php/adminpages/featured-image-extended-quickedit.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/featured-image-extended/php/adminpages/featured-image-extended.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/featured-image-extended/php/adminpages/credits.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/featured-image-extended/php/adminpages/general-settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/featured-image-extended/php/adminpages/featured-image-extended-admin-cell.php:11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/featured-image-extended/php/adminpages/featured-image-extended-admin-cell.php on line 8
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/featured-image-extended/php/adminpages/featured-image-extended-admin-cell.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: thumbnail, category, featured image, post, theme...

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

The primary PHP file in "Featured Image Extended" version 1.0.2 is used by WordPress to initiate all plugin functionality
42 characters long description:
A WordPress Featured Image Extended plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin743 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10140389556
CSS118675
PO File1294173
JavaScript1151739

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.33
▷ Minimum class complexity19.00
▷ Maximum class complexity27.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods830.77%
▷ Public methods2596.15%
▷ Protected methods00.00%
▷ Private methods13.85%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/empty-img-placeholder.png2.33KB2.06KB▼ 11.58%