79% woo-to-moodle

Code Review | Woo to Moodle

WordPress plugin Woo to Moodle scored79%from 54 tests.

About plugin

  • Plugin page: woo-to-moodle
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Mar 14, 2018
  • Latest release: Mar 14, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: kojihugy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,789 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.98ms] Passed 4 tests

Server-side resources used by Woo to Moodle
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0935.10 ▼4.45
Dashboard /wp-admin3.41 ▲0.0647.36 ▼11.54
Posts /wp-admin/edit.php3.46 ▲0.1044.02 ▼1.55
Add New Post /wp-admin/post-new.php5.99 ▲0.1085.57 ▼14.37
Media Library /wp-admin/upload.php3.33 ▲0.1034.80 ▼0.09
Moodle /wp-admin/edit.php?post_type=product&page=wootomoolinks3.1021.50
Moodle /wp-admin/options-general.php?page=wootomoo_settings_menu3.3032.80

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: 1 new table, 7 new options
New tables
wp_wootomoo_links
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
wootomoo_version
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Woo to Moodle
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.081.78 ▲0.1542.95 ▼5.11
Dashboard /wp-admin2,196 ▲185.50 ▼0.2087.09 ▼10.8536.78 ▼14.85
Posts /wp-admin/edit.php2,083 ▼171.99 ▲0.0235.96 ▼1.1331.58 ▼1.98
Add New Post /wp-admin/post-new.php1,529 ▲322.98 ▼0.42625.77 ▲18.3274.01 ▲14.04
Media Library /wp-admin/upload.php1,404 ▲44.26 ▲0.0396.25 ▼10.3041.34 ▼3.42
Moodle /wp-admin/edit.php?post_type=product&page=wootomoolinks280.420.084.35
Moodle /wp-admin/options-general.php?page=wootomoo_settings_menu8762.1325.0828.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • wootomoo_version
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woo-to-moodle/wootomoo_admin_page_display.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=product&page=wootomoolinks
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=wootomoolinks - Failed to load resource: the server responded with a status of 403 (Forbidden)

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
4 plugin tags: register, woocommerce, course, moodle

woo-to-moodle/woo-to-moodle.php Passed 13 tests

Analyzing the main PHP file in "Woo to Moodle" version 1.1
92 characters long description:
This plugin will automatically enroll in Moodle customers who buy the course in WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,160 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP815282724
PO File4176200436

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin