84% easy-digital-downloads-addon-for-wp-courseware

Code Review | WP Courseware for Easy Digital Downloads

WordPress plugin WP Courseware for Easy Digital Downloads scored84%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 18, 2014
  • Latest release: Dec 9, 2022
  • Number of updates: 22
  • Update frequency: every 145.9 days
  • Top authors: flyplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /5,077 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.32ms] Passed 4 tests

Server-side resources used by WP Courseware for Easy Digital Downloads
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.30 ▼3.60
Dashboard /wp-admin3.38 ▲0.0845.47 ▼4.21
Posts /wp-admin/edit.php3.49 ▲0.1444.50 ▲1.90
Add New Post /wp-admin/post-new.php5.96 ▲0.0881.16 ▼16.11
Media Library /wp-admin/upload.php3.30 ▲0.0832.79 ▼1.36

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Courseware for Easy Digital Downloads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.19 ▼0.391.78 ▲0.1542.97 ▼5.72
Dashboard /wp-admin2,197 ▲205.57 ▼0.0985.89 ▼8.8339.04 ▼4.63
Posts /wp-admin/edit.php2,108 ▲52.03 ▲0.0839.52 ▼1.4238.01 ▼0.15
Add New Post /wp-admin/post-new.php1,531 ▼323.02 ▲4.84643.70 ▲4.9051.18 ▼19.17
Media Library /wp-admin/upload.php1,405 ▲24.19 ▼0.12106.81 ▲8.7348.70 ▲5.63

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-digital-downloads-addon-for-wp-courseware/wp-courseware-edd.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
2 plugin tags: learning management system, selling online courses

easy-digital-downloads-addon-for-wp-courseware/wp-courseware-edd.php 92% from 13 tests

The entry point to "WP Courseware for Easy Digital Downloads" version 1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-digital-downloads-addon-for-wp-courseware.php" instead of "wp-courseware-edd.php")

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
Success! There were no dangerous files found in this plugin409 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2175210409

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity25.00
▷ Minimum class complexity20.00
▷ Maximum class complexity30.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1664.00%
▷ Protected methods728.00%
▷ Private methods28.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin