73% foldio360

Code Review | foldio-plugin

WordPress plugin foldio-plugin scored 73% from 54 tests.

About plugin

  • Plugin page: foldio360
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-5.8
  • WordPress version: 5.8.1
  • First release: Oct 1, 2021
  • Latest release: Oct 1, 2021
  • Number of updates: 2
  • Update frequency: every 15.0 days
  • Top authors: preethamsridhar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 47 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.44MB] [CPU: ▼143.42ms] Passed 4 tests

An overview of server-side resources used by foldio-plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.16 ▲0.4340.80 ▲9.96
Dashboard /wp-admin3.67 ▲0.6137.85 ▼2.65
Posts /wp-admin/edit.php3.73 ▲0.6241.71 ▼3.83
Add New Post /wp-admin/post-new.php5.54 ▲0.1085.84 ▼570.45
Media Library /wp-admin/upload.php3.68 ▲0.6738.45 ▲3.26
License /wp-admin/admin.php?page=license3.6536.23
Custom Setting /wp-admin/admin.php?page=foldio_page_of_admin3.6536.55

Server storage [IO: ▲4.85MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 94 new files
Database: 4 new tables, no new options
New tables
wp_foldio360_licence_details
wp_foldio360_store
wp_foldio360_images_list
wp_foldio360_shortcode_setting

Browser metrics Passed 4 tests

foldio-plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,925 ▲32917.21 ▲1.5319.48 ▲9.6656.61 ▲2.74
Dashboard /wp-admin3,059 ▲1257.38 ▲1.38164.00 ▲8.5384.96 ▼36.92
Posts /wp-admin/edit.php2,850 ▲1113.23 ▲0.5486.25 ▲17.6563.22 ▼28.28
Add New Post /wp-admin/post-new.php1,699 ▲1622.50 ▲4.23294.36 ▼101.7977.59 ▼38.03
Media Library /wp-admin/upload.php1,923 ▲1135.85 ▲0.74175.80 ▲11.92130.86 ▲1.62
License /wp-admin/admin.php?page=license1,5012.6184.3763.06
Custom Setting /wp-admin/admin.php?page=foldio_page_of_admin2,3302.7491.9579.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_foldio360_store
    • wp_foldio360_shortcode_setting
    • wp_foldio360_licence_details
    • wp_foldio360_images_list

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=foldio_page_of_admin
    • > Notice in wp-content/plugins/foldio360/template/foldioEditor.php+494
    Undefined index: post

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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 add_action() in wp-content/plugins/foldio360/foldioImageList.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=foldio_page_of_admin
    • > Network (severe)
    wp-content/themes/twentytwentyone/js/foldio360.js?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=foldio_page_of_admin
    • > Network (severe)
    wp-content/themes/twentytwentyone/js/specificSetting360.js?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=foldio_page_of_admin
    • > Network (severe)
    wp-content/themes/twentytwentyone/js/shortCodeSpecificSetting.js?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=foldio_page_of_admin
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.init (/wp-content/plugins/foldio360//js/foldio360.js?ver=5.8.1:27:46)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=foldio_page_of_admin
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: jQuery(...).sortable is not a function

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
10 plugin tags: woocommerce image rotation, 360 degree, foldio360, rotation plugin, product rotate...

foldio360/foldio360.php Passed 13 tests

The main file in "foldio-plugin" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
125 characters long description:
Its a 360 product image rotation plugin use for WooCommerce applications, user can ulooad and show images on product section.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected28,124 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
SVG90116,867
PHP116338585,677
JavaScript74366903,402
CSS51782411,575
PO File2134215295
Pascal1471,560283
Markdown116025

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions64
▷ Named functions64100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
31 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/360-white.png2.99KB1.40KB▼ 53.05%
images/checked.png4.10KB0.47KB▼ 88.50%
images/editor_menu_load360.png0.65KB0.37KB▼ 43.37%
images/rotate_icon_a@3x.png5.51KB2.78KB▼ 49.65%
images/left-bottom.png1.67KB1.08KB▼ 35.63%