84% json-image-resolver

Code Review | JSON image resolver

WordPress plugin JSON image resolver scored84%from 54 tests.

About plugin

  • Plugin page: json-image-resolver
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-3.9.2
  • WordPress version: 6.3.1
  • First release: Aug 18, 2014
  • Latest release: Aug 20, 2014
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: joaobeno (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /831 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by JSON image resolver
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.25 ▼2.33
Dashboard /wp-admin3.32 ▼0.0249.56 ▼12.48
Posts /wp-admin/edit.php3.38 ▲0.0249.76 ▼0.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.00 ▼18.56
Media Library /wp-admin/upload.php3.25 ▲0.0236.20 ▲0.98

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/json-image-resolver/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

JSON image resolver: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.43 ▲0.071.64 ▼0.3738.45 ▼3.13
Dashboard /wp-admin2,221 ▲184.85 ▼1.05111.47 ▲7.5044.95 ▲1.19
Posts /wp-admin/edit.php2,103 ▲62.02 ▲0.0241.19 ▲3.3635.64 ▲0.12
Add New Post /wp-admin/post-new.php1,544 ▲1223.23 ▼0.06675.76 ▼10.6253.71 ▼0.28
Media Library /wp-admin/upload.php1,397 ▼04.23 ▲0.0499.53 ▼4.1844.07 ▼2.70

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/json-image-resolver/json-image-resolver.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: json api image url

json-image-resolver/json-image-resolver.php Passed 13 tests

Analyzing the main PHP file in "JSON image resolver" version 1.0.0
52 characters long description:
Get one or more images from wordpress media library.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin138 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12630107
Markdown215031

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods450.00%
▷ Protected methods450.00%
▷ 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

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