84% resize-images-in-posts

Code Review | Resize Images In Posts

WordPress plugin Resize Images In Posts scored 84% from 54 tests.

About plugin

  • Plugin page: resize-images-in-...
  • Plugin version: 4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Mar 27, 2014
  • Latest release: Oct 29, 2017
  • Number of updates: 22
  • Update frequency: every 59.7 days
  • Top authors: alexvorn2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 5,095 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▲3.03ms] Passed 4 tests

This is a short check of server-side resources used by Resize Images In Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1064.90 ▲23.46
Dashboard /wp-admin3.52 ▲0.2256.86 ▲2.49
Posts /wp-admin/edit.php3.64 ▲0.2860.07 ▲5.36
Add New Post /wp-admin/post-new.php6.09 ▲0.2096.94 ▲1.39
Media Library /wp-admin/upload.php3.43 ▲0.2039.95 ▲2.89
Resize Images In Posts /wp-admin/plugins.php?page=resize_images_in_posts3.5543.20

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Resize Images In Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲14114.75 ▲1.491.89 ▲0.1242.29 ▼2.15
Dashboard /wp-admin2,350 ▲1446.42 ▲1.55135.80 ▲22.3548.70 ▲3.84
Posts /wp-admin/edit.php2,253 ▲1643.30 ▲1.2655.82 ▲18.0235.98 ▲0.61
Add New Post /wp-admin/post-new.php1,536 ▲1323.38 ▲0.20669.46 ▲7.4339.10 ▼7.90
Media Library /wp-admin/upload.php1,392 ▲74.14 ▼0.0880.23 ▼21.2241.93 ▼5.08
Resize Images In Posts /wp-admin/plugins.php?page=resize_images_in_posts1,3973.3047.2331.41

Uninstaller [IO: ✅] [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
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/plugins.php?page=resize_images_in_posts
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at Object.init (/wp-content/plugins/resize-images-in-posts/includes/admin/js/admin-menu.js?ver=4.3:44:53)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/resize-images-in-posts/includes/admin/js/admin-menu.js?ver=4.3:114:75)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/plugins.php?page=resize_images_in_posts
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration Passed 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: images, posts, image, resize

resize-images-in-posts/resize-images-in-posts.php Passed 13 tests

This is the main PHP file of "Resize Images In Posts" version 4.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
101 characters long description:
This plugin will resize images in your posts. (Go to: Dashboard -> Plugins -> Resize Images in Posts)

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
Everything looks great! No dangerous files found in this plugin1,684 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP114331301,374
CSS1480234
JavaScript1251476

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods3
▷ Static methods133.33%
▷ Public methods133.33%
▷ Protected methods00.00%
▷ Private methods266.67%
Functions30
▷ Named functions30100.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