84% display-attached-file-size

Code Review | Display Attached File Size

WordPress plugin Display Attached File Size scored84%from 54 tests.

About plugin

  • Plugin page: display-attached-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 9, 2014
  • Latest release: Jun 10, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: momen2009 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,078 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Display Attached File Size
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.86 ▲2.99
Dashboard /wp-admin3.31 ▲0.0164.47 ▲13.05
Posts /wp-admin/edit.php3.37 ▲0.0149.31 ▼5.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.56 ▼17.50
Media Library /wp-admin/upload.php3.24 ▲0.0137.08 ▼0.17

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Display Attached File Size: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.174.52 ▲2.7643.16 ▼5.07
Dashboard /wp-admin2,203 ▲155.82 ▲0.9799.87 ▼10.2541.08 ▲1.38
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.1335.48 ▼1.7034.25 ▲0.80
Add New Post /wp-admin/post-new.php1,514 ▼1517.65 ▼0.77687.01 ▲78.6256.28 ▼15.23
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0393.65 ▼11.4740.11 ▼6.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/display-attached-file-size/display-attached-file-size.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: file, size, library, display, media

display-attached-file-size/display-attached-file-size.php Passed 13 tests

The main file in "Display Attached File Size" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
90 characters long description:
メディアライブラリの一覧にファイルサイズを表示するプラグイン

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP182139

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected