89% fasta-credit-for-checkout

Code Review | FASTA Credit for Checkout

WordPress plugin FASTA Credit for Checkout scored89%from 54 tests.

About plugin

  • Plugin page: fasta-credit-for-...
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.1
  • WordPress version: 6.3.1
  • First release: May 15, 2019
  • Latest release: Sep 15, 2020
  • Number of updates: 35
  • Update frequency: every 14.0 days
  • Top authors: redblade (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /981 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by FASTA Credit for Checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.62 ▼7.63
Dashboard /wp-admin3.31 ▼0.0348.60 ▼18.07
Posts /wp-admin/edit.php3.36 ▲0.0153.53 ▲4.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.62 ▼27.42
Media Library /wp-admin/upload.php3.23 ▲0.0139.51 ▼1.61

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for FASTA Credit for Checkout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.23 ▼0.362.02 ▲0.1245.72 ▼0.17
Dashboard /wp-admin2,221 ▲274.84 ▼1.03104.75 ▼22.1639.37 ▼7.58
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0641.06 ▲5.9239.95 ▲2.25
Add New Post /wp-admin/post-new.php1,540 ▲823.21 ▼0.12603.06 ▼131.7153.07 ▼7.33
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.0999.42 ▼23.2545.88 ▼2.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% 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
Attributes that need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

fasta-credit-for-checkout/fasta-credit-for-checkout.php 77% from 13 tests

The main file in "FASTA Credit for Checkout" v. 1.0.11 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 253 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.5" instead of "2.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin319 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34715299
JavaScript11020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity18.00
▷ Minimum class complexity8.00
▷ Maximum class complexity28.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/fasta-logo-woocommerce.png3.74KB2.39KB▼ 36.07%