84% specify-missing-image-dimensions

Code Review | Specify Missing Image Dimensions

WordPress plugin Specify Missing Image Dimensions scored84%from 54 tests.

About plugin

  • Plugin page: specify-missing-i...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Mar 18, 2021
  • Latest release: May 29, 2022
  • Number of updates: 7
  • Update frequency: every 62.7 days
  • Top authors: yasir129 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /9,627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.40ms] Passed 4 tests

An overview of server-side resources used by Specify Missing Image Dimensions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.73 ▼1.32
Dashboard /wp-admin3.36 ▲0.0143.62 ▼15.83
Posts /wp-admin/edit.php3.41 ▲0.0544.78 ▼6.53
Add New Post /wp-admin/post-new.php5.94 ▲0.0597.82 ▼9.93
Media Library /wp-admin/upload.php3.28 ▲0.0534.51 ▲0.15
SMID /wp-admin/options-general.php?page=SMID-plugin3.2531.04

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Specify Missing Image Dimensions
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.11 ▼1.471.65 ▼0.0538.62 ▼1.78
Dashboard /wp-admin2,210 ▲224.87 ▼1.02109.98 ▲0.1941.79 ▲2.84
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0140.61 ▲6.0835.00 ▼0.26
Add New Post /wp-admin/post-new.php1,540 ▲718.22 ▼5.05614.05 ▼25.4249.56 ▼6.31
Media Library /wp-admin/upload.php1,389 ▲14.18 ▲0.0092.13 ▼5.9340.83 ▼2.87
SMID /wp-admin/options-general.php?page=SMID-plugin8942.0222.9027.86

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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)
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
  • 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/specify-missing-image-dimensions/admin/admin-settings.php:5

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: cls, images, image optimization, pagespeed, speed...

specify-missing-image-dimensions/specify-missing-image-dimensions.php Passed 13 tests

The primary PHP file in "Specify Missing Image Dimensions" version 1.0.2 is used by WordPress to initiate all plugin functionality
73 characters long description:
A plugin that helps to add missing width and height attributes to images.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected291 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP214112291

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions12
▷ Named functions12100.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
There are no PNG files in this plugin