84% edd-card

Code Review | EDD Card

WordPress plugin EDD Card scored84%from 54 tests.

About plugin

  • Plugin page: edd-card
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-4.9
  • WordPress version: 6.3.1
  • First release: Mar 7, 2018
  • Latest release: Mar 11, 2018
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: alpipego (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /799 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.88ms] Passed 4 tests

Analyzing server-side resources used by EDD Card
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.11 ▲1.02
Dashboard /wp-admin3.33 ▲0.0257.14 ▲6.14
Posts /wp-admin/edit.php3.38 ▲0.0248.67 ▼3.49
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.02 ▼7.48
Media Library /wp-admin/upload.php3.25 ▲0.0239.71 ▲2.42

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for EDD Card
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.37 ▲1.121.67 ▼3.6243.66 ▼0.86
Dashboard /wp-admin2,198 ▲215.64 ▲0.0596.11 ▼1.7443.12 ▲0.85
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0134.84 ▼7.5935.56 ▼3.18
Add New Post /wp-admin/post-new.php1,526 ▼023.20 ▲0.20625.14 ▼100.7862.60 ▲4.81
Media Library /wp-admin/upload.php1,400 ▼34.24 ▲0.03101.09 ▼2.2644.93 ▼0.75

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Alpipego\\EddCard\\add_action() in wp-content/plugins/edd-card/edd-card.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 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: easy digital downloads, credit-card, edd

edd-card/edd-card.php Passed 13 tests

"EDD Card" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
58 characters long description:
Adaption of @jessepollak's Card for Easy Digital Downloads

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
Success! There were no dangerous files found in this plugin1,953 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4641,897
PHP1101646
CSS11110

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
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%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin