84% show-featured-image-size-in-admin-topbar

Code Review | Show Featured Image Size in Admin TopBar

WordPress plugin Show Featured Image Size in Admin TopBar scored84%from 54 tests.

About plugin

  • Plugin page: show-featured-ima...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2016
  • Latest release: Sep 23, 2023
  • Number of updates: 28
  • Update frequency: every 89.6 days
  • Top authors: apasionados (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,644 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.01ms] Passed 4 tests

Analyzing server-side resources used by Show Featured Image Size in Admin TopBar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.67 ▼1.39
Dashboard /wp-admin3.32 ▲0.0149.28 ▲0.75
Posts /wp-admin/edit.php3.37 ▲0.0151.60 ▼4.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.86 ▼18.78
Media Library /wp-admin/upload.php3.24 ▲0.0136.24 ▲0.66
Featured Image Size /wp-admin/options-general.php?page=show-featured-image-size-in-admin-topbar/sfisiat.php3.2135.50

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Show Featured Image Size in Admin TopBar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.18 ▼0.971.82 ▼0.3732.58 ▼10.54
Dashboard /wp-admin2,223 ▲325.85 ▲0.97108.38 ▲2.8241.28 ▲1.05
Posts /wp-admin/edit.php2,106 ▲172.17 ▲0.1240.15 ▼1.0538.54 ▲1.81
Add New Post /wp-admin/post-new.php1,552 ▲1918.55 ▼4.58616.86 ▼58.3062.83 ▼9.86
Media Library /wp-admin/upload.php1,405 ▲204.21 ▼0.0296.27 ▼16.9346.20 ▼0.14
Featured Image Size /wp-admin/options-general.php?page=show-featured-image-size-in-admin-topbar/sfisiat.php8672.0523.0928.62

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-featured-image-size-in-admin-topbar/sfisiat.php:27

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: topbar, admin, administration, featured image size

show-featured-image-size-in-admin-topbar/sfisiat.php 92% from 13 tests

The main PHP script in "Show Featured Image Size in Admin TopBar" version 1.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("show-featured-image-size-in-admin-topbar.php" instead of "sfisiat.php")

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
Good job! No executable or dangerous file extensions detected146 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1132083
PO File1141463

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin