89% wp-courseware-mailchimp-addon

Code Review | WP Courseware - Mailchimp Addon

WordPress plugin WP Courseware - Mailchimp Addon scored89%from 54 tests.

About plugin

  • Plugin page: wp-courseware-mai...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 3, 2021
  • Latest release: Dec 9, 2022
  • Number of updates: 6
  • Update frequency: every 143.0 days
  • Top authors: flyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /531 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.99ms] Passed 4 tests

An overview of server-side resources used by WP Courseware - Mailchimp Addon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.14 ▲3.16
Dashboard /wp-admin3.31 ▲0.0048.18 ▼2.72
Posts /wp-admin/edit.php3.36 ▲0.0050.86 ▲3.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.49 ▼15.74
Media Library /wp-admin/upload.php3.23 ▲0.0038.10 ▼0.67

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Courseware - Mailchimp Addon
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.64 ▲0.261.98 ▲0.2744.34 ▲4.43
Dashboard /wp-admin2,189 ▲85.53 ▼0.1785.59 ▼23.9638.38 ▼9.80
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0438.55 ▲1.9333.27 ▼0.34
Add New Post /wp-admin/post-new.php1,545 ▲1423.12 ▲0.04678.32 ▼17.4350.33 ▼6.23
Media Library /wp-admin/upload.php1,403 ▲94.16 ▼0.0897.82 ▼19.6441.40 ▼4.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 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
3 plugin tags: mailchimp, wordpress learning management system, wordpress lms

wp-courseware-mailchimp-addon/wpcw-mailchimp.php 77% from 13 tests

This is the main PHP file of "WP Courseware - Mailchimp Addon" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-courseware-mailchimp-addon.php" instead of "wpcw-mailchimp.php")

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
Good job! No executable or dangerous file extensions detected258 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP562173258

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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
Namespaces1
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin