73% edd-custom-credit-card-icons

Code Review | Custom Credit Card Icons for Easy Digital Downloads

WordPress plugin Custom Credit Card Icons for Easy Digital Downloads scored 73% from 54 tests.

About plugin

  • Plugin page: edd-custom-credit...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Nov 26, 2022
  • Number of updates: 5
  • Update frequency: every 146.2 days
  • Top authors: marcodedo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 716 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.87MB] [CPU: ▲6.00ms] Passed 4 tests

An overview of server-side resources used by Custom Credit Card Icons for Easy Digital Downloads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9049.94 ▲5.81
Dashboard /wp-admin4.20 ▲0.9053.62 ▲5.99
Posts /wp-admin/edit.php4.25 ▲0.9057.39 ▲12.28
Add New Post /wp-admin/post-new.php6.72 ▲0.8498.17 ▼0.08
Media Library /wp-admin/upload.php4.06 ▲0.8446.15 ▲12.89
Custom Credit Card Icons /wp-admin/edit.php?post_type=download&page=edd-custom-credit-card-icons3.9033.94
Dashboard /wp-admin/plugins.php?page=meta-box4.0638.32

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

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

Browser metrics Passed 4 tests

Custom Credit Card Icons for Easy Digital Downloads: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.28 ▼1.001.87 ▼0.3741.47 ▼3.37
Dashboard /wp-admin2,210 ▲195.83 ▲0.9895.56 ▼6.5338.55 ▼10.83
Posts /wp-admin/edit.php2,092 ▼02.05 ▼0.0134.78 ▼5.4033.36 ▼2.91
Add New Post /wp-admin/post-new.php1,541 ▲423.11 ▲4.74640.69 ▼3.2353.91 ▼7.91
Media Library /wp-admin/upload.php1,413 ▲224.22 ▲0.0399.75 ▲1.7742.17 ▼1.90
Custom Credit Card Icons /wp-admin/edit.php?post_type=download&page=edd-custom-credit-card-icons280.440.104.34
Dashboard /wp-admin/plugins.php?page=meta-box1,3222.1625.3247.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/templates/video.php
    • > /wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/templates/media.php
    • > /wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/templates/image-advanced.php
    • > /wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/templates/audio.php
    • > /wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/templates/upload.php
  • 74× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/about/sections/tabs.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/fields/input.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_File_Field' not found in wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/fields/image.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Textarea_Field' not found in wp-content/plugins/edd-custom-credit-card-icons/assets/mb-settings-page/src/BackupField.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Object_Choice_Field' not found in wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/fields/sidebar.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Multiple_Values_Field' not found in wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/fields/text-list.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Choice_Field' not found in wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/fields/button-group.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Text_Field' not found in wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/fields/color.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box-group/group-field.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Multiple_Values_Field' not found in wp-content/plugins/edd-custom-credit-card-icons/assets/meta-box/inc/fields/autocomplete.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=download&page=edd-custom-credit-card-icons
    • > Network (severe)
    wp-admin/edit.php?post_type=download&page=edd-custom-credit-card-icons - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === edd-custom-credit-card-icons === )
The official readme.txt is a good inspiration

edd-custom-credit-card-icons/edd-custom-credit-card-icons.php Passed 13 tests

The principal PHP file in "Custom Credit Card Icons for Easy Digital Downloads" v. 1.0.0 is loaded by WordPress automatically on each request
59 characters long description:
Easy add custom credit card icons to Easy Digital Downloads

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected12,038 lines of code in 270 files:
LanguageFilesBlank linesComment linesLines of code
PHP1251,4484,7016,956
JavaScript1006205462,562
CSS412131322,319
Sass1159141
PO File2101755
SVG1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.14
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes102
▷ Abstract classes65.88%
▷ Concrete classes9694.12%
▷ Final classes00.00%
Methods545
▷ Static methods31357.43%
▷ Public methods47286.61%
▷ Protected methods468.44%
▷ Private methods274.95%
Functions31
▷ Named functions2064.52%
▷ Anonymous functions1135.48%
Constants10
▷ Global constants10100.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
14 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/meta-box/img/jqueryui/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
assets/meta-box/img/jqueryui/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/meta-box/img/jqueryui/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
assets/meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
assets/meta-box/img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%