10% cryptocurrency-ticker

Code Review | Cryptocurrency Ticker

WordPress plugin Cryptocurrency Ticker scored10%from 54 tests.

About plugin

  • Plugin page: cryptocurrency-ti...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.0.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2013
  • Latest release: Jan 4, 2019
  • Number of updates: 29
  • Update frequency: every 71.8 days
  • Top authors: rbbrdckybk (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /16,003 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/cryptocurrency-ticker/crypto-ticker.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; CryptoTickerWidget has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼52.41ms] Passed 4 tests

An overview of server-side resources used by Cryptocurrency Ticker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.314.66 ▼32.17
Dashboard /wp-admin2.17 ▼1.137.35 ▼41.90
Posts /wp-admin/edit.php2.17 ▼1.185.70 ▼42.46
Add New Post /wp-admin/post-new.php2.17 ▼3.725.47 ▼93.11
Media Library /wp-admin/upload.php2.17 ▼1.065.04 ▼29.55

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cryptocurrency Ticker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.26 ▼0.981.65 ▼0.2045.00 ▼0.79
Dashboard /wp-admin2,206 ▲244.88 ▼0.99103.56 ▼3.2940.87 ▼0.08
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0235.25 ▼2.1836.77 ▼1.17
Add New Post /wp-admin/post-new.php1,533 ▼023.48 ▲0.29578.40 ▼115.5855.78 ▲0.97
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0793.56 ▼8.8642.65 ▼1.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/cryptocurrency-ticker/crypto-ticker.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; CryptoTickerWidget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_cryptotickerwidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cryptocurrency-ticker/crypto-ticker.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: The official readme.txt might help

cryptocurrency-ticker/crypto-ticker.php 92% from 13 tests

"Cryptocurrency Ticker" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cryptocurrency-ticker.php" instead of "crypto-ticker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin228 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12616193
CSS18035

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.38
▷ 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 methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
3 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/BTC.png3.46KB0.93KB▼ 73.02%
img/LTC.png2.24KB0.82KB▼ 63.43%
img/ETH.png15.21KB0.51KB▼ 96.62%