78% fripixel-crypto-quotation

Code Review | Fripixel Crypto Quotation

WordPress plugin Fripixel Crypto Quotation scored78%from 54 tests.

About plugin

  • Plugin page: fripixel-crypto-q...
  • Plugin version: 5.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 6.3.1
  • First release: Sep 1, 2021
  • Latest release: Sep 1, 2021
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: fripixel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.21ms] Passed 4 tests

An overview of server-side resources used by Fripixel Crypto Quotation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1140.03 ▼3.64
Dashboard /wp-admin3.42 ▲0.1149.76 ▼7.05
Posts /wp-admin/edit.php3.53 ▲0.1747.43 ▼3.49
Add New Post /wp-admin/post-new.php6.00 ▲0.1187.57 ▼14.64
Media Library /wp-admin/upload.php3.34 ▲0.1139.96 ▲2.47

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Fripixel Crypto Quotation
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.511.72 ▲0.0140.97 ▼1.32
Dashboard /wp-admin2,203 ▲125.78 ▼0.12101.78 ▼5.8740.93 ▼5.40
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0436.64 ▲0.0335.54 ▼1.34
Add New Post /wp-admin/post-new.php1,542 ▲618.21 ▼4.95612.84 ▼68.8255.18 ▼4.35
Media Library /wp-admin/upload.php1,382 ▼64.19 ▼0.0396.91 ▼5.5043.04 ▼7.61

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

Smoke tests 50% from 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fripixel-crypto-quotation/quotation.php
  • 124× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/guzzle/tests/Handler/CurlMultiHandlerTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/promises/tests/PromiseTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/guzzle/tests/PrepareBodyMiddlewareTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/psr7/tests/MessageTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/guzzle/tests/InternalUtilsTest.php:9
    • > PHP Warning
      require(wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/psr7/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/psr7/tests/Integration/server.php on line 5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/psr7/src/Request.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Client\\Tests\\HttpClientTest' not found in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/guzzle/tests/HttplugIntegrationTest.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/fripixel-crypto-quotation/vendor/guzzlehttp/psr7/src/Response.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: quotation, bitcoin, crypto, currency

fripixel-crypto-quotation/index.php 85% from 13 tests

The entry point to "Fripixel Crypto Quotation" version 5.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Git Repository: Please remove the Git repository from this plugin
  • Main file name: The principal plugin file should be the same as the plugin slug ("fripixel-crypto-quotation.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected28,375 lines of code in 275 files:
LanguageFilesBlank linesComment linesLines of code
PHP2043,7546,21721,489
Markdown161,17203,539
reStructuredText88601,0881,109
JSON1300813
YAML161315518
XML860392
make4485216
JavaScript21960185
CSS217078
Python1182228
Dockerfile1608

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.47
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces22
Interfaces26
Traits3
Classes159
▷ Abstract classes00.00%
▷ Concrete classes159100.00%
▷ Final classes3723.27%
Methods1,729
▷ Static methods1538.85%
▷ Public methods1,58991.90%
▷ Protected methods170.98%
▷ Private methods1237.11%
Functions477
▷ Named functions469.64%
▷ Anonymous functions43190.36%
Constants66
▷ Global constants23.03%
▷ Class constants6496.97%
▷ Public constants5382.81%

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
4 PNG files occupy 0.37MB with 0.16MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/screenshot-1.png54.55KB27.19KB▼ 50.15%
vendor/guzzlehttp/guzzle/docs/_static/guzzle-icon.png0.78KB0.94KB0.00%
vendor/guzzlehttp/guzzle/docs/_static/logo.png241.87KB69.68KB▼ 71.19%
vendor/guzzlehttp/guzzle/.github/logo.png78.23KB34.21KB▼ 56.26%