84% mystem-edd

Code Review | MyStem EDD

WordPress plugin MyStem EDD scored84%from 54 tests.

About plugin

  • Plugin page: mystem-edd
  • Plugin version: 1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2
  • WordPress version: 6.3.1
  • First release: Jul 26, 2018
  • Latest release: Apr 28, 2019
  • Number of updates: 6
  • Update frequency: every 46.3 days
  • Top authors: lobov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,001 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.73ms] Passed 4 tests

Server-side resources used by MyStem EDD
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.04 ▼3.74
Dashboard /wp-admin3.31 ▲0.0149.37 ▼4.22
Posts /wp-admin/edit.php3.36 ▲0.0152.05 ▲0.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.50 ▼21.40
Media Library /wp-admin/upload.php3.24 ▲0.0134.70 ▼1.56

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

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

Browser metrics Passed 4 tests

MyStem EDD: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.16 ▼1.271.96 ▲0.3143.97 ▲3.11
Dashboard /wp-admin2,208 ▲235.80 ▼0.0199.85 ▼14.3740.85 ▼2.84
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0434.10 ▼3.2638.33 ▲3.69
Add New Post /wp-admin/post-new.php1,547 ▲2818.59 ▼4.56624.96 ▼60.9757.92 ▼3.41
Media Library /wp-admin/upload.php1,396 ▲114.22 ▼0.0197.87 ▼14.3740.82 ▼8.47

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dynamic_sidebar() in wp-content/plugins/mystem-edd/single-template/sidebar-single.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dynamic_sidebar() in wp-content/plugins/mystem-edd/page-templates/sidebar-member.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-edd/template/grid-without-sidebar.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-edd/template/classic-without-sidebar.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-edd/template/grid.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-edd/template/grid-without-sidebar-third.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mystem-edd/widgets/more-author-downloads.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mystem-edd/template/grid-third.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mystem-edd/widgets/display-downloads.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dynamic_sidebar() in wp-content/plugins/mystem-edd/template/sidebar-category.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: easy digital downloads, mystem, edd, easydigitaldownloads

mystem-edd/mystem-edd.php 92% from 13 tests

The entry point to "MyStem EDD" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin2,564 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP213962121,929
CSS54823434
JavaScript93314201

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity20.00
▷ Minimum class complexity4.00
▷ Maximum class complexity42.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods33
▷ Static methods412.12%
▷ Public methods3296.97%
▷ Protected methods00.00%
▷ Private methods13.03%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/no-image-icon.png3.48KB1.68KB▼ 51.70%