78% jresizr

Code Review | JResizr

WordPress plugin JResizr scored78%from 54 tests.

About plugin

  • Plugin page: jresizr
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Oct 28, 2012
  • Latest release: Oct 28, 2012
  • Number of updates: 2
  • Update frequency: every 11.5 days
  • Top authors: jegbagus (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,663 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by JResizr
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0747.24 ▼0.31
Dashboard /wp-admin3.38 ▲0.0851.75 ▼4.66
Posts /wp-admin/edit.php3.50 ▲0.1451.60 ▼4.09
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.06 ▼9.49
Media Library /wp-admin/upload.php3.30 ▲0.0736.67 ▼5.12
Jresizr /wp-admin/options-general.php?page=jresizr3.2836.76

Server storage [IO: ▲0.35MB] [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: 93 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

JResizr: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.75 ▲0.431.70 ▼0.2336.95 ▼6.49
Dashboard /wp-admin2,199 ▲255.55 ▼0.0588.55 ▼10.4741.19 ▼3.04
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0339.48 ▲2.5835.97 ▲1.46
Add New Post /wp-admin/post-new.php1,529 ▲122.98 ▼0.39633.57 ▼65.0752.88 ▼0.23
Media Library /wp-admin/upload.php1,407 ▲44.20 ▲0.1095.72 ▼14.2441.93 ▼9.63
Jresizr /wp-admin/options-general.php?page=jresizr8742.0727.9452.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/jresizr/jresizr.php:261

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=jresizr
    • > Javascript (severe) in unknown
    /wp-content/plugins/jresizr/js/jquery.ibutton.min.js?ver=20123009 20:630 Uncaught TypeError: Cannot set properties of undefined (setting 'iphone')
    • > GET request to /wp-admin/options-general.php?page=jresizr
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: C is not a constructor" "TypeError: C is not a constructor\n at HTMLInputElement.\u003Canonymous> (/wp-content/plugins/jresizr/js/jquery.ibutton.min.js?ver=20123009:21:589)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:1594)\n at E.fn.iButton (/wp-content/plugins/jresizr/js/jquery.ibutton.min.js?ver=20123009:21:573)\n at Object.setSwitchToogle (/wp-content/plugins/jresizr/js/script.js?ver=20123009:46:25)\n at Object.init (/wp-content/plugins/jresizr/js/script.js?ver=20123009:15:13)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/jresizr/js/script.js?ver=20123009:87:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&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&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=jresizr
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: C is not a constructor

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #2, #3 in jresizr/assets to your readme.txt
You can take inspiration from this readme.txt

jresizr/jresizr.php Passed 13 tests

"JResizr" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
70 characters long description:
Give abilty to uncrop image and put background color behind the image.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,452 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS1194301,045
JavaScript4123221739
PHP798181433
SVG100235

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.40
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods3085.71%
▷ Protected methods514.29%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
72 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
css/images/custom_rgb_g.png1.04KB0.80KB▼ 23.67%
css/images/Splatter-icon.png0.49KB0.72KB0.00%
css/images/colorpicker_rgb_g.png1.04KB0.83KB▼ 20.21%
css/images/select.png0.49KB0.33KB▼ 33.40%