84% badgeos-edd-integration

Code Review | BadgeOS EDD Integration

WordPress plugin BadgeOS EDD Integration scored84%from 54 tests.

About plugin

  • Plugin page: badgeos-edd-integ...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Aug 25, 2020
  • Latest release: Apr 7, 2022
  • Number of updates: 4
  • Update frequency: every 147.5 days
  • Top authors: learningtimes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /437 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: ▼11.73ms] 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 /3.46 ▲0.0031.95 ▼5.56
Dashboard /wp-admin3.31 ▲0.0041.15 ▼2.89
Posts /wp-admin/edit.php3.36 ▲0.0046.45 ▲0.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0075.22 ▼36.41
Media Library /wp-admin/upload.php3.23 ▲0.0031.81 ▼2.05

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, 8 new options
New WordPress options
theysaidso_admin_options
bosedd_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
bosedd_version
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for BadgeOS EDD Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲3614.35 ▲0.071.67 ▼0.1539.89 ▲1.84
Dashboard /wp-admin2,198 ▲315.59 ▼0.0794.72 ▼4.5242.24 ▼0.07
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0336.12 ▼3.9035.31 ▼0.45
Add New Post /wp-admin/post-new.php1,531 ▲223.30 ▲0.24677.55 ▲79.5863.33 ▲11.09
Media Library /wp-admin/upload.php1,403 ▲64.22 ▼0.02110.00 ▲12.7847.71 ▲3.21

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 8 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • bosedd_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • bosedd_options
    • can_compress_scripts
    • db_upgraded

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.2, 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,027 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS341481,287
PHP7251389682
Markdown218032
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%