10% satoshipay

Code Review | SatoshiPay

WordPress plugin SatoshiPay scored10%from 54 tests.

About plugin

  • Plugin page: satoshipay
  • Plugin version: 1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.5-5.2
  • WordPress version: 6.3.1
  • First release: Nov 14, 2015
  • Latest release: Jul 22, 2019
  • Number of updates: 53
  • Update frequency: every 25.4 days
  • Top authors: satoshipay (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

20+ active /6,572 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/satoshipay/satoshipay.php+38
    include_once(wp-content/plugins/satoshipay/config.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼1.89MB] [CPU: ▼54.14ms] Passed 4 tests

Analyzing server-side resources used by SatoshiPay
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.374.72 ▼36.98
Dashboard /wp-admin2.12 ▼1.197.43 ▼44.07
Posts /wp-admin/edit.php2.12 ▼1.247.09 ▼43.60
Add New Post /wp-admin/post-new.php2.12 ▼3.775.72 ▼91.90
Media Library /wp-admin/upload.php2.12 ▼1.115.65 ▼28.27

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

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

Browser metrics Passed 4 tests

SatoshiPay: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8314.35 ▲0.131.65 ▼0.3239.05 ▼6.59
Dashboard /wp-admin2,254 ▲775.66 ▲0.1095.12 ▲2.6842.78 ▼1.28
Posts /wp-admin/edit.php2,155 ▲552.01 ▲0.0040.53 ▲2.8237.60 ▼1.24
Add New Post /wp-admin/post-new.php6,382 ▲4,85629.05 ▲5.92943.14 ▲313.4338.05 ▼12.03
Media Library /wp-admin/upload.php1,455 ▲554.22 ▲0.01103.81 ▼2.3744.50 ▲2.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/satoshipay/satoshipay.php+38
    include_once(wp-content/plugins/satoshipay/config.php): failed to open stream: No such file or directory
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • satoshipay_ad_blocker_detection

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/satoshipay/satoshipay.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/satoshipay/src/SatoshiPay/SatoshiPayAdminPlugin.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/satoshipay/src/SatoshiPay/SatoshiPayAdminPlugin.php on line 19
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/satoshipay/src/SatoshiPay/SatoshiPayAdminPlugin.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/satoshipay/src/SatoshiPay/Command/FixtureCommand.php:19

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

satoshipay/satoshipay.php Passed 13 tests

Analyzing the main PHP file in "SatoshiPay" version 1.11
59 characters long description:
Integrates SatoshiPay's micropayment system into WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin7,355 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP268061,5373,332
JavaScript735386953,293
CSS41878423
Sass9178293
JSON10014

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.39
Average class complexity31.77
▷ Minimum class complexity1.00
▷ Maximum class complexity99.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods167
▷ Static methods3017.96%
▷ Public methods12273.05%
▷ Protected methods2816.77%
▷ Private methods1710.18%
Functions30
▷ Named functions1343.33%
▷ Anonymous functions1756.67%
Constants32
▷ Global constants1856.25%
▷ Class constants1443.75%
▷ Public constants14100.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
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/tinymce-video.png2.74KB1.59KB▼ 42.02%
assets/images/tinymce-download.png3.19KB1.81KB▼ 43.24%
assets/images/tinymce-audio.png2.80KB1.65KB▼ 40.98%
assets/images/tinymce-donation.png10.68KB3.50KB▼ 67.19%
assets/images/tinymce-start.png1.89KB1.36KB▼ 28.30%