66% awesome-studio

Code Review | Awesome Studio

WordPress plugin Awesome Studio scored66%from 54 tests.

About plugin

  • Plugin page: awesome-studio
  • Plugin version: 2.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.3.0
  • WordPress version: 6.3.1
  • First release: Jan 7, 2016
  • Latest release: Nov 18, 2019
  • Number of updates: 95
  • Update frequency: every 14.9 days
  • Top authors: anirudha.prabhune (76.84%)wpoets (24.21%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /4,226 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲3.56MB] [CPU: ▲4.93ms] Passed 4 tests

A check of server-side resources used by Awesome Studio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.50 ▲4.0370.71 ▲28.18
Dashboard /wp-admin7.59 ▲4.2980.36 ▲30.89
Posts /wp-admin/edit.php5.73 ▲2.3735.23 ▼17.42
Add New Post /wp-admin/post-new.php9.45 ▲3.5692.58 ▼21.92
Media Library /wp-admin/upload.php7.51 ▲4.2879.77 ▲38.73
Install Module /wp-admin/admin.php?page=install-awesome-module7.4264.44
Get Module Shortcode /wp-admin/admin.php?page=awesome-get-shortcode7.4263.17
App Starter Packs /wp-admin/admin.php?page=app-starter-pack7.4264.08
Set Module Trigger /wp-admin/admin.php?page=awesome-set-trigger7.4261.34
Add Device Token /wp-admin/post-new.php?post_type=device_tokens7.7486.04
Install App /wp-admin/admin.php?page=install-app7.4265.51
Reports /wp-admin/edit.php?post_type=book&page=book-report7.3159.25
Device Token /wp-admin/edit.php?post_type=device_tokens7.5668.94

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

Filesystem and database footprint
Please try to fix the following items
  • Try to limit filesystem usage to 25MB (currently using 44.72MB)
Filesystem: 8,724 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
aw2_trigger_when_children
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Awesome Studio
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,009 ▲22314.69 ▲0.012.15 ▲0.0440.69 ▼5.23
Dashboard /wp-admin2,339 ▲1624.95 ▼0.6095.88 ▲4.5539.65 ▼4.10
Posts /wp-admin/edit.php2,263 ▲1632.51 ▲0.4839.88 ▲2.8831.06 ▼1.97
Add New Post /wp-admin/post-new.php1,606 ▲7522.25 ▼0.98622.06 ▼67.4733.12 ▼18.63
Media Library /wp-admin/upload.php1,547 ▲1474.48 ▲0.25105.22 ▼15.4143.48 ▼6.00
Install Module /wp-admin/admin.php?page=install-awesome-module9412.1632.6824.06
Get Module Shortcode /wp-admin/admin.php?page=awesome-get-shortcode9412.1529.6120.86
App Starter Packs /wp-admin/admin.php?page=app-starter-pack9412.1731.2924.25
Set Module Trigger /wp-admin/admin.php?page=awesome-set-trigger9412.1530.3722.54
Add Device Token /wp-admin/post-new.php?post_type=device_tokens2,5068.16201.5169.90
Install App /wp-admin/admin.php?page=install-app9412.1528.1022.76
Reports /wp-admin/edit.php?post_type=book&page=book-report280.440.063.74
Device Token /wp-admin/edit.php?post_type=device_tokens1,2352.3939.7928.22

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

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

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=install-awesome-module
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'aw2_module_install_awesome_module_callback' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=awesome-get-shortcode
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'aw2_module_get_shortcode' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=app-starter-pack
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'aw2_app_starter_pack_callback' not found or invalid function name
    • > GET request to /wp-admin/admin.php?page=awesome-set-trigger
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'aw2_module_set_trigger' not found or invalid function name
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=device_tokens
    • > Notice in wp-content/plugins/awesome-studio/shortcodes/includes/triggers.php+492
    Undefined variable: custom_sizes
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=device_tokens
    • > Warning in wp-content/plugins/awesome-studio/shortcodes/includes/triggers.php+492
    array_merge(): Expected parameter 2 to be an array, null given
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=device_tokens
    • > Warning in wp-includes/media-template.php+1180
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=install-app
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'aw2_install_app_callback' not found or invalid function name

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/awesome-studio/monoframe/razorpay-php/libs/Requests-1.6.1/examples/multiple.php
    • > /wp-content/plugins/awesome-studio/monoframe/editor/gmet-content.php
    • > /wp-content/plugins/awesome-studio/monoframe/razorpay-php/libs/Requests-1.6.1/examples/basic-auth.php
    • > /wp-content/plugins/awesome-studio/monoframe/razorpay-php/libs/Requests-1.6.1/bin/create_pear_package.php
    • > /wp-content/plugins/awesome-studio/monoframe/razorpay-php/libs/Requests-1.6.1/examples/get.php
    • > /wp-content/plugins/awesome-studio/monoframe/razorpay-php/libs/Requests-1.6.1/examples/session.php
    • > /wp-content/plugins/awesome-studio/monoframe/tcpdf/tools/tcpdf_addfont.php
    • > /wp-content/plugins/awesome-studio/monoframe/razorpay-php/libs/Requests-1.6.1/examples/post.php
    • > /wp-content/plugins/awesome-studio/monoframe/iptocountry/ip_files/unknown.php
    • > /wp-content/plugins/awesome-studio/monoframe/hybridauth/index.php
  • 4095× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/awesome-studio/monoframe/apis/g-suite/vendor/google/apiclient-services/src/Google/Service/DoubleClickBidManager/QuerySchedule.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/awesome-studio/monoframe/apis/g-suite/vendor/google/apiclient-services/src/Google/Service/CloudFunctions/OperationMetadataV1Beta2.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'AWeberResponse' not found in wp-content/plugins/awesome-studio/monoframe/apis/aweber/aweber_entry.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-studio/monoframe/zoho-crm.php:96
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/awesome-studio/monoframe/apis/g-suite/vendor/google/apiclient-services/src/Google/Service/Datastore/KindExpression.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/awesome-studio/monoframe/apis/g-suite/vendor/google/apiclient-services/src/Google/Service/AdSenseHost/Report.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/awesome-studio/monoframe/apis/g-suite/vendor/google/apiclient-services/src/Google/Service/Compute/VpnTunnelsScopedList.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/awesome-studio/monoframe/apis/g-suite/vendor/google/apiclient-services/src/Google/Service/Script/Operation.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/awesome-studio/monoframe/apis/g-suite/vendor/google/apiclient-services/src/Google/Service/Storage/Policy.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/awesome-studio/monoframe/apis/g-suite/vendor/google/apiclient-services/src/Google/Service/Slides/Placeholder.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=book&page=book-report
    • > Network (severe)
    wp-admin/edit.php?post_type=book&page=book-report - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

awesome-studio/awesome-ui-2.php 92% from 13 tests

"Awesome Studio" version 2.4.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("awesome-studio.php" instead of "awesome-ui-2.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin644,338 lines of code in 8,520 files:
LanguageFilesBlank linesComment linesLines of code
PHP8,11851,970310,072611,218
JavaScript2542,2991,36112,871
CSS261,4201,26110,471
Markdown652,10706,377
JSON23001,394
Sass14279241,273
PO File1115149263
HTML418397
make2311590
XML55088
Bourne Shell234179
YAML49061
Perl116531
Python110225

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 4,349)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 499)
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.85
▷ Minimum class complexity1.00
▷ Maximum class complexity4,349.00
Average method complexity1.51
▷ Minimum method complexity1.00
▷ Maximum method complexity499.00
Code structure
Namespaces55
Interfaces46
Traits6
Classes7,898
▷ Abstract classes570.72%
▷ Concrete classes7,84199.28%
▷ Final classes90.11%
Methods60,199
▷ Static methods1,4892.47%
▷ Public methods58,38496.98%
▷ Protected methods8411.40%
▷ Private methods9741.62%
Functions583
▷ Named functions37664.49%
▷ Anonymous functions20735.51%
Constants1,938
▷ Global constants29515.22%
▷ Class constants1,64384.78%
▷ Public constants1,643100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
34 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
shortcodes/css/info.png1.12KB0.24KB▼ 78.23%
monoframe/cmb/core/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
monoframe/cmb/extras/date-range-field/assets/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
monoframe/cmb/core/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
monoframe/module-distribution/css/info.png1.12KB0.24KB▼ 78.23%