83% coincorner-checkout

Code Review | CoinCorner Checkout

WordPress plugin CoinCorner Checkout scored83%from 54 tests.

About plugin

  • Plugin page: coincorner-checkout
  • Plugin version: 1.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.2
  • WordPress version: 6.3.1
  • First release: May 28, 2019
  • Latest release: Jun 18, 2019
  • Number of updates: 6
  • Update frequency: every 4.2 days
  • Top authors: coincornercheckout (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /5,120 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.39ms] Passed 4 tests

An overview of server-side resources used by CoinCorner Checkout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.78 ▲0.74
Dashboard /wp-admin3.35 ▲0.0545.15 ▼4.76
Posts /wp-admin/edit.php3.40 ▲0.0450.18 ▲1.83
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.60 ▼3.37
Media Library /wp-admin/upload.php3.27 ▲0.0437.44 ▲2.31

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for CoinCorner Checkout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.33 ▼1.051.60 ▼0.1438.26 ▲0.18
Dashboard /wp-admin2,209 ▲185.96 ▲0.87111.68 ▲2.0240.44 ▼3.47
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0240.92 ▲1.0434.99 ▼3.51
Add New Post /wp-admin/post-new.php1,554 ▲2118.44 ▼4.90600.97 ▼89.3773.12 ▲18.29
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.0294.38 ▼11.0644.72 ▼2.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/coincorner-checkout/CoinCornerCheckout.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

coincorner-checkout/CoinCornerCheckout.php 85% from 13 tests

"CoinCorner Checkout" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("coincorner-checkout.php" instead of "CoinCornerCheckout.php")
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected252 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14118252

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods112.50%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/CoinCornerLogo.png6.68KB4.37KB▼ 34.59%
images/BTC.png1.37KB1.30KB▼ 4.64%