83% checkout-styler-for-easy-digital-downloads

Code Review | Checkout Styler for Easy Digital Downloads

WordPress plugin Checkout Styler for Easy Digital Downloads scored83%from 54 tests.

About plugin

  • Plugin page: checkout-styler-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 18, 2019
  • Latest release: Apr 18, 2019
  • Number of updates: 2
  • Update frequency: every 7.5 days
  • Top authors: ideaboxcreations (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,042 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Checkout Styler for Easy Digital Downloads
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.44 ▼5.71
Dashboard /wp-admin3.31 ▲0.0059.14 ▲7.25
Posts /wp-admin/edit.php3.36 ▲0.0051.05 ▲3.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.35 ▼12.24
Media Library /wp-admin/upload.php3.23 ▲0.0039.88 ▲9.26

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Checkout Styler for Easy Digital Downloads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.031.78 ▼0.0345.59 ▲5.68
Dashboard /wp-admin2,195 ▲155.50 ▼0.1390.90 ▲1.0140.00 ▼3.50
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0934.31 ▼1.2840.61 ▲0.90
Add New Post /wp-admin/post-new.php1,528 ▲223.16 ▼0.42659.55 ▲47.5751.03 ▼17.98
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0196.06 ▼15.0341.38 ▼0.19

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(EDD_CHECKOUT_STYLER_DIRincludes/class-edd-customizer.php): failed to open stream: No such file or directory in wp-content/plugins/checkout-styler-for-easy-digital-downloads/includes/customizer.php on line 3
    • > PHP Warning
      Use of undefined constant EDD_CHECKOUT_STYLER_DIR - assumed 'EDD_CHECKOUT_STYLER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/checkout-styler-for-easy-digital-downloads/includes/customizer.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/checkout-styler-for-easy-digital-downloads/includes/class-edd-customizer.php:63
    • > PHP Fatal error
      require_once(): Failed opening required 'EDD_CHECKOUT_STYLER_DIRincludes/class-edd-customizer.php' (include_path='.:/usr/share/php') in wp-content/plugins/checkout-styler-for-easy-digital-downloads/includes/customizer.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Please fix the following attributes: The official readme.txt is a good inspiration

checkout-styler-for-easy-digital-downloads/edd-styler.php 85% from 13 tests

The main PHP script in "Checkout Styler for Easy Digital Downloads" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("checkout-styler-for-easy-digital-downloads.php" instead of "edd-styler.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,822 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41172543,822

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.77
Average class complexity27.00
▷ Minimum class complexity15.00
▷ Maximum class complexity39.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods20
▷ Static methods1470.00%
▷ Public methods1365.00%
▷ Protected methods630.00%
▷ Private methods15.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin