84% ecommerce-store-lms-course-sync

Code Review | Ecommerce Store LMS Course Sync

WordPress plugin Ecommerce Store LMS Course Sync scored84%from 54 tests.

About plugin

  • Plugin page: ecommerce-store-l...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2023
  • Latest release: Mar 8, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: cyberlord92 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /100 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.61MB] [CPU: ▼13.96ms] Passed 4 tests

An overview of server-side resources used by Ecommerce Store LMS Course Sync
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.19 ▼5.91
Dashboard /wp-admin3.37 ▲0.0757.04 ▲4.66
Posts /wp-admin/edit.php3.49 ▲0.1352.97 ▲4.40
Add New Post /wp-admin/post-new.php3.25 ▼2.6437.45 ▼57.95
Media Library /wp-admin/upload.php3.30 ▲0.0739.73 ▲3.61

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ecommerce Store LMS Course Sync
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.27 ▼0.451.61 ▼0.0645.54 ▲2.62
Dashboard /wp-admin2,202 ▲255.56 ▼0.1095.55 ▼6.1573.91 ▲30.91
Posts /wp-admin/edit.php2,122 ▲222.01 ▼0.0138.10 ▲1.1736.20 ▲1.35
Add New Post /wp-admin/post-new.php1,458 ▼6816.63 ▼6.57647.71 ▼54.3060.52 ▲8.13
Media Library /wp-admin/upload.php1,416 ▲194.21 ▼0.01101.37 ▼9.9774.84 ▲30.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ecommerce-store-lms-course-sync/admin/partials/setup-instructions.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATHadmin/partials/class-ecommerce-store-lms-course-sync-save-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/ecommerce-store-lms-course-sync/admin/partials/setup-form.php on line 15
    • > PHP Warning
      Use of undefined constant ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATH - assumed 'ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ecommerce-store-lms-course-sync/admin/partials/setup-form.php on line 15
    • > PHP Warning
      Use of undefined constant ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATH - assumed 'ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ecommerce-store-lms-course-sync/admin/partials/setup-form.php on line 15
    • > PHP Fatal error
      require_once(): Failed opening required 'ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATHadmin/partials/class-ecommerce-store-lms-course-sync-save-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/ecommerce-store-lms-course-sync/admin/class-mo-ecommerce-store-lms-course-sync-admin.php on line 15
    • > PHP Warning
      require_once(ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATHadmin/partials/class-ecommerce-store-lms-course-sync-save-settings.php): failed to open stream: No such file or directory in wp-content/plugins/ecommerce-store-lms-course-sync/admin/class-mo-ecommerce-store-lms-course-sync-admin.php on line 15
    • > PHP Warning
      Use of undefined constant ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATH - assumed 'ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ecommerce-store-lms-course-sync/admin/class-mo-ecommerce-store-lms-course-sync-admin.php on line 15
    • > PHP Warning
      require_once(ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATHadmin/partials/class-ecommerce-store-lms-course-sync-save-settings.php): failed to open stream: No such file or directory in wp-content/plugins/ecommerce-store-lms-course-sync/admin/partials/setup-form.php on line 15
    • > PHP Fatal error
      require_once(): Failed opening required 'ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATHadmin/partials/class-ecommerce-store-lms-course-sync-save-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/ecommerce-store-lms-course-sync/admin/partials/setup-form.php on line 15
    • > PHP Warning
      require_once(ECOMMERCE_STORE_LMS_COURSE_SYNC_PLUGIN_PATHadmin/partials/class-ecommerce-store-lms-course-sync-save-settings.php): failed to open stream: No such file or directory in wp-content/plugins/ecommerce-store-lms-course-sync/admin/partials/setup-form.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Shopify Products to Learndash Courses mapping) image missing
You can look at the official readme.txt

ecommerce-store-lms-course-sync/ecommerce-store-lms-course-sync.php Passed 13 tests

"Ecommerce Store LMS Course Sync" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Ecommerce Product Sync with Learndash courses.

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
Everything looks great! No dangerous files found in this plugin355 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13135521353
CSS1001
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2586.21%
▷ Protected methods00.00%
▷ Private methods413.79%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.25MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/images/setup-instructions/step-1.png105.99KB50.76KB▼ 52.10%
admin/partials/images/miniorange.png0.44KB0.35KB▼ 18.61%
admin/partials/images/setup-instructions/step-3.png52.16KB25.26KB▼ 51.56%
admin/partials/images/setup-instructions/step-2.png92.41KB41.01KB▼ 55.62%