90% specify-image-dimensions

Code Review | Specify Image Dimensions

WordPress plugin Specify Image Dimensions scored90%from 54 tests.

About plugin

  • Plugin page: specify-image-dim...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Aug 23, 2016
  • Latest release: Jan 30, 2017
  • Number of updates: 12
  • Update frequency: every 13.3 days
  • Top authors: factmaven (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /8,043 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.18ms] Passed 4 tests

An overview of server-side resources used by Specify Image Dimensions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.48 ▲1.75
Dashboard /wp-admin3.39 ▲0.0845.56 ▼3.84
Posts /wp-admin/edit.php3.42 ▲0.0743.81 ▼5.05
Add New Post /wp-admin/post-new.php6.06 ▲0.1776.83 ▼12.16
Media Library /wp-admin/upload.php3.32 ▲0.1035.62 ▼3.67

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Specify Image Dimensions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.141.87 ▼0.2244.30 ▼2.51
Dashboard /wp-admin2,197 ▲124.86 ▼0.98101.34 ▲3.9541.36 ▼2.80
Posts /wp-admin/edit.php2,089 ▼32.05 ▼0.0035.20 ▼2.2632.33 ▲2.61
Add New Post /wp-admin/post-new.php1,533 ▼623.16 ▲0.22659.82 ▼14.4952.12 ▼2.56
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0696.24 ▼8.7143.51 ▼3.64

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

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

"Specify Image Dimensions" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
119 characters long description:
Automatically specify image dimensions that are missing width and/or height attributes. Helps with website speed tools.

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

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code1.16
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin