63% designious-library-setup

Code Review | Designious Library Lumise Add-on for WooCommerce

WordPress plugin Designious Library Lumise Add-on for WooCommerce scored63%from 54 tests.

About plugin

  • Plugin page: designious-librar...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Jan 28, 2021
  • Latest release: Jan 28, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: designious (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,055 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.88MB] [CPU: ▼32.73ms] Passed 4 tests

An overview of server-side resources used by Designious Library Lumise Add-on for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.00 ▼1.62
Dashboard /wp-admin3.06 ▼0.2423.70 ▼23.10
Posts /wp-admin/edit.php3.06 ▼0.3025.44 ▼27.68
Add New Post /wp-admin/post-new.php3.06 ▼2.8326.83 ▼69.77
Media Library /wp-admin/upload.php3.06 ▼0.1722.95 ▼10.36
Setup /wp-admin/admin.php?page=designious_library_setup3.0625.83
Designious Library /wp-admin/admin.php?page=designious_library3.0621.70

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

Designious Library Lumise Add-on for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.23 ▼1.051.90 ▲0.2743.98 ▼18.38
Dashboard /wp-admin2,231 ▲495.83 ▼0.04101.27 ▼0.4944.60 ▲1.32
Posts /wp-admin/edit.php2,114 ▲251.99 ▲0.0133.94 ▼6.5637.88 ▲5.23
Add New Post /wp-admin/post-new.php1,558 ▲4418.35 ▲0.84630.92 ▼10.7858.45 ▼3.12
Media Library /wp-admin/upload.php1,413 ▲284.20 ▲0.0193.26 ▼8.0141.89 ▼5.59
Setup /wp-admin/admin.php?page=designious_library_setup6991.147.3319.73
Designious Library /wp-admin/admin.php?page=designious_library280.440.093.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/designious-library-setup/designious-library-setup.php+34
    Undefined index: designious-library-setup
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% 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 errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=designious_library
    • > Notice in wp-content/plugins/designious-library-setup/designious-library-setup.php+34
    Undefined index: designious-library-setup
    • > GET request to /wp-admin/admin.php?page=designious_library_setup
    • > Notice in wp-includes/class-wp-http.php+1037
    Undefined index: _redirection
    • > GET request to /wp-admin/admin.php?page=designious_library_setup
    • > Error in wp-content/plugins/designious-library-setup/designious-library-setup.php+220
    Uncaught Error: Call to a member function get_option() on null in wp-content/plugins/designious-library-setup/designious-library-setup.php:220
    Stack trace:
    #0 wp-content/plugins/designious-library-setup/src/templates/setup_view.php(10): DesigniousLibrarySetup->is_addon_installed()
    #1 wp-content/plugins/designious-library-setup/designious-library-setup.php(82): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): DesigniousLibrarySetup->render_setup_view()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_latest_addon_version() on null in wp-content/plugins/designious-library-setup/src/templates/setup_view.php:7
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/designious-library-setup/designious-library-setup.php on line 231
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/designious-library-setup/designious-library-setup.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=designious_library
    • > Network (severe)
    wp-admin/admin.php?page=designious_library - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: woocommerce, design library, sell, t-shirt design, lumise...

designious-library-setup/designious-library-setup.php Passed 13 tests

The main file in "Designious Library Lumise Add-on for WooCommerce" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
56 characters long description:
Enhance Lumise with the Designious Library functionality

Code Analysis Passed 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
No dangerous file extensions were detected262 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2288256
CSS1106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1173.33%
▷ Protected methods00.00%
▷ Private methods426.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.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
There were not PNG files found in your plugin