10% wpgraphicstudio

Code Review | wpGraphicStudio

WordPress plugin wpGraphicStudio scored 10% from 54 tests.

About plugin

  • Plugin page: wpgraphicstudio
  • Plugin version: 6.4.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2015
  • Latest release: Jul 17, 2015
  • Number of updates: 215
  • Update frequency: every 0.5 days
  • Top authors: wpgraphicstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,367 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wpgraphicstudio/includes/install.php+134
    Use of undefined constant create_page - assumed 'create_page' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.53MB] [CPU: ▲4.16ms] Passed 4 tests

An overview of server-side resources used by wpGraphicStudio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5151.53 ▲8.38
Dashboard /wp-admin3.87 ▲0.57100.92 ▲51.00
Posts /wp-admin/edit.php3.89 ▲0.5453.94 ▲5.97
Add New Post /wp-admin/post-new.php6.50 ▲0.6180.99 ▼7.23
Media Library /wp-admin/upload.php3.73 ▲0.5043.74 ▲9.51
Welcome to wpGraphicStudio /wp-admin/index.php?page=wpgs-credits3.6142.74
Welcome to wpGraphicStudio /wp-admin/index.php?page=wpgs-about3.6541.99
wpGraphicStudio /wp-admin/admin.php?page=wpgs-core-settings3.6339.03

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 135 new files
Database: no new tables, 10 new options
New WordPress options
create_page
wpgs_wpgraphicstudio_install
db_upgraded
widget_recent-posts
wpgs_completed_upgrades
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
wpgs_version
widget_recent-comments

Browser metrics Passed 4 tests

wpGraphicStudio: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲18213.93 ▼0.405.37 ▲3.2646.05 ▼2.90
Dashboard /wp-admin2,236 ▲515.09 ▼0.77106.82 ▼17.8542.43 ▼1.79
Posts /wp-admin/edit.php2,138 ▲492.59 ▲0.5839.73 ▲2.1146.87 ▲11.42
Add New Post /wp-admin/post-new.php1,548 ▲1423.55 ▲0.35690.61 ▲10.5336.82 ▼24.31
Media Library /wp-admin/upload.php1,431 ▲434.51 ▲0.31115.43 ▲4.7752.83 ▲6.16
Welcome to wpGraphicStudio /wp-admin/index.php?page=wpgs-credits8142.1928.1620.50
Welcome to wpGraphicStudio /wp-admin/index.php?page=wpgs-about8922.1630.3048.06
wpGraphicStudio /wp-admin/admin.php?page=wpgs-core-settings1,2232.2030.6923.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • wpgs_completed_upgrades
    • wpgs_version
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/index.php?page=wpgs-credits
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'WPGS_Welcome' does not have a method 'credits_screen'
    • > GET request to /wp-admin/admin.php?page=wpgs-core-settings
    • > Notice in wp-content/plugins/wpgraphicstudio/includes/misc-functions.php+560
    Undefined index: settings-updated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpgs-core-settings
    • > Notice in wp-content/plugins/wpgraphicstudio/includes/misc-functions.php+649
    Undefined variable: remove_settings

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpgraphicstudio/includes/libraries/wp-session.php:81
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_currentuserinfo() in wp-content/plugins/wpgraphicstudio/includes/wpgs/templates/headlines.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_currentuserinfo() in wp-content/plugins/wpgraphicstudio/includes/wpgs/templates/web-boxes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpgraphicstudio/includes/libraries/wp_session/wp-session.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/wpgraphicstudio/includes/wpgs/templates/create-graphic.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Recursive_ArrayAccess' not found in wp-content/plugins/wpgraphicstudio/includes/libraries/class-wp-session.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_currentuserinfo() in wp-content/plugins/wpgraphicstudio/includes/wpgs/templates/belcher-boxes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpgraphicstudio/includes/class-wpgs-cron.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_currentuserinfo() in wp-content/plugins/wpgraphicstudio/includes/wpgs/templates/buttons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_currentuserinfo() in wp-content/plugins/wpgraphicstudio/includes/wpgs/templates/cta-boxes.php:3

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 errors were detected

Optimizations

Plugin configuration 86% from 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: generator, affiliate marketing graphics, graphics

wpgraphicstudio/wp-graphic-studio.php 69% from 13 tests

The main file in "wpGraphicStudio" v. 6.4.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpgraphicstudio.php" instead of "wp-graphic-studio.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin11,554 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP321,3733,7787,422
JavaScript84873382,480
CSS141043791,572
XML15044
SVG10036

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 525)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity86.55
▷ Minimum class complexity2.00
▷ Maximum class complexity764.00
Average method complexity7.36
▷ Minimum method complexity1.00
▷ Maximum method complexity525.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes218.18%
Methods148
▷ Static methods32.03%
▷ Public methods13490.54%
▷ Protected methods64.05%
▷ Private methods85.41%
Functions150
▷ Named functions150100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
40 PNG files occupy 0.83MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wpgraphicstudio-logo.png16.63KB7.91KB▼ 52.44%
includes/wpgs/assets/images/wpgraphicstudio-logo.png16.63KB7.91KB▼ 52.44%
includes/wpgs/images/info.png1.52KB1.49KB▼ 2.37%
includes/wpgs/images/web-boxes/web-boxes.png19.55KB9.11KB▼ 53.41%
includes/wpgs/images/success.png1.17KB1.19KB0.00%