84% badgeos-edd-integration

Code Review | BadgeOS EDD Integration

WordPress plugin BadgeOS EDD Integration scored 84% from 54 tests.

About plugin

  • Plugin page: badgeos-edd-integ...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.3
  • WordPress version: 5.8.1
  • First release: Aug 25, 2020
  • Latest release: Aug 26, 2020
  • Number of updates: 3
  • Update frequency: every 4.3 days
  • Top authors: learningtimes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 151 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by BadgeOS EDD Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0033.64 ▲1.05
Dashboard /wp-admin3.06 ▲0.0042.59 ▲0.02
Posts /wp-admin/edit.php3.11 ▲0.0044.56 ▲0.24
Add New Post /wp-admin/post-new.php5.42 ▼0.0194.79 ▼539.33
Media Library /wp-admin/upload.php3.00 ▲0.0033.10 ▼1.42

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 2 new options
New WordPress options
bosedd_options
bosedd_version

Browser metrics Passed 4 tests

An overview of browser requirements for BadgeOS EDD Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,727 ▲15516.30 ▲0.729.83 ▲0.4043.76 ▼6.48
Dashboard /wp-admin2,967 ▲335.94 ▼0.20139.73 ▼8.32109.28 ▼0.18
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0065.48 ▲2.3586.32 ▲0.11
Add New Post /wp-admin/post-new.php1,672 ▼1118.88 ▲0.55398.13 ▲2.47106.04 ▼17.12
Media Library /wp-admin/upload.php1,810 ▲35.00 ▼0.03157.29 ▲8.13117.31 ▼2.34

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 2 options in the database
    • bosedd_version
    • bosedd_options

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 no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 2× 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/badgeos-edd-integration/includes/integration/rules-engine.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/badgeos-edd-integration/includes/integration/steps-ui.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

badgeos-edd-integration/badgeos-edd-integration.php 92% from 13 tests

This is the main PHP file of "BadgeOS EDD Integration" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • 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 review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,024 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS341481,287
PHP7251389682
Markdown217029
JavaScript310726

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.50
▷ Minimum class complexity17.00
▷ Maximum class complexity18.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods531.25%
▷ Public methods1381.25%
▷ Protected methods00.00%
▷ Private methods318.75%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/wooninjas.png6.78KB4.52KB▼ 33.32%