84% pmr-media-library-image-dimensions

Code Review | PMR | Add Image Dimensions Columns

WordPress plugin PMR | Add Image Dimensions Columns scored 84% from 54 tests.

About plugin

  • Plugin page: pmr-media-library...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 24, 2015
  • Latest release: Feb 22, 2018
  • Number of updates: 4
  • Update frequency: every 273.5 days
  • Top authors: pmriley21 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active / 1,491 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by PMR | Add Image Dimensions Columns
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0144.02 ▲4.41
Dashboard /wp-admin3.31 ▲0.0151.30 ▲2.64
Posts /wp-admin/edit.php3.36 ▲0.0151.52 ▼0.10
Add New Post /wp-admin/post-new.php5.89 ▲0.01132.93 ▲27.89
Media Library /wp-admin/upload.php3.23 ▲0.0139.11 ▲4.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by PMR | Add Image Dimensions Columns
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.37 ▼0.921.87 ▲0.1340.97 ▼10.81
Dashboard /wp-admin2,206 ▲174.87 ▼0.08124.56 ▲8.7145.76 ▲1.18
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0543.20 ▲0.1637.71 ▼3.80
Add New Post /wp-admin/post-new.php1,534 ▼420.96 ▼2.23711.51 ▲17.6960.79 ▲11.35
Media Library /wp-admin/upload.php1,385 ▲34.26 ▲0.04126.10 ▲23.6653.11 ▲7.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/pmr-media-library-image-dimensions/image_dimensions.php:11

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === pmr-media-library-image-dimensions === )
Please take inspiration from this readme.txt

pmr-media-library-image-dimensions/image_dimensions.php 92% from 13 tests

"PMR | Add Image Dimensions Columns" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pmr-media-library-image-dimensions.php" instead of "image_dimensions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112836

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin