10% image-studio

Code Review | Image Studio

WordPress plugin Image Studio scored10%from 54 tests.

About plugin

  • Plugin page: image-studio
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 12, 2019
  • Latest release: Jun 19, 2019
  • Number of updates: 12
  • Update frequency: every 0.6 days
  • Top authors: insivia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /639 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/image-studio/modules/hooks.php+1064
    Undefined index: image_action

Server metrics [RAM: ▼1.39MB] [CPU: ▼45.54ms] Passed 4 tests

A check of server-side resources used by Image Studio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.06 ▼0.4017.33 ▼22.39
Dashboard /wp-admin2.56 ▼0.756.95 ▼43.29
Posts /wp-admin/edit.php2.56 ▼0.808.35 ▼35.00
Add New Post /wp-admin/post-new.php2.56 ▼3.337.18 ▼75.64
Media Library /wp-admin/upload.php2.56 ▼0.678.89 ▼28.23
Image Studio /wp-admin/options-general.php?page=wig_settings2.568.60

Server storage [IO: ▲2.69MB] [DB: ▲0.31MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Studio
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,416 ▲67017.04 ▲2.6521.63 ▲19.8445.00 ▼0.50
Dashboard /wp-admin2,369 ▲1816.52 ▲0.70115.17 ▼1.7139.38 ▼4.02
Posts /wp-admin/edit.php2,269 ▲1803.75 ▲1.7056.81 ▲19.3432.18 ▼2.08
Add New Post /wp-admin/post-new.php2,243 ▲72923.24 ▲5.56655.05 ▲46.7547.60 ▼5.94
Media Library /wp-admin/upload.php1,406 ▲244.29 ▲0.09100.22 ▲2.8149.27 ▲5.67
Image Studio /wp-admin/options-general.php?page=wig_settings3,8993.3752.1089.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/image-studio/modules/hooks.php+1064
    Undefined index: image_action
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/hooks.php+1094
    Undefined index: image_action
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/hooks.php+1074
    Undefined index: process_image
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/hooks.php+1107
    Undefined index: generate_image
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/settings.php+304
    Undefined variable: locale_taro
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/settings.php+13
    Undefined index: save_settings_field
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/settings.php+137
    Undefined index: id
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/settings.php+137
    Undefined index: style
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/settings.php+137
    Undefined index: class
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/settings.php+137
    Undefined variable: out
  • 531 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/settings.php+140
    Trying to access array offset on value of type bool
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Notice in wp-content/plugins/image-studio/modules/settings.php+144
    Undefined index: sub_text
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wig_settings
    • > Warning in wp-content/plugins/image-studio/modules/settings.php+210
    in_array() expects parameter 2 to be array, null given

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
  • 7× 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/image-studio/modules/ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/image-studio/modules/settings.php:275
    • > PHP Notice
      Undefined index: image_action in wp-content/plugins/image-studio/modules/hooks.php on line 1064
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/image-studio/modules/scripts.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/image-studio/modules/scripts.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/image-studio/modules/meta_box.php:728
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/image-studio/modules/hooks.php:1068

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: images, advertising, social media

image-studio/image-studio.php Passed 13 tests

"Image Studio" version 1.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
95 characters long description:
Configure and create designer images for social media and ads from your posts, pages, and CPTs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin16,434 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
CSS5476010,340
PHP65983781,802
JavaScript33721821,481
Sass1319221,158
LESS1319311,149
SVG100504

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity43.80
▷ Minimum class complexity2.00
▷ Maximum class complexity102.00
Average method complexity7.48
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
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
5 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/inc/assets/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/images/align-middle.png0.97KB1.08KB0.00%
modules/images/align-bottom.png0.95KB1.08KB0.00%
modules/images/align-top.png0.98KB1.08KB0.00%
modules/inc/assets/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%