78% crypto-price-and-stats

Code Review | Crypto Price And Stats

WordPress plugin Crypto Price And Stats scored 78% from 54 tests.

About plugin

  • Plugin page: crypto-price-and-...
  • Plugin version: 0.0.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 28, 2022
  • Latest release: May 18, 2023
  • Number of updates: 8
  • Update frequency: every 52.4 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 2,566 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.85ms] Passed 4 tests

Server-side resources used by Crypto Price And Stats
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.82 ▼3.15
Dashboard /wp-admin3.32 ▲0.0250.73 ▼1.48
Posts /wp-admin/edit.php3.37 ▲0.0249.65 ▼2.15
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.98 ▼8.60
Media Library /wp-admin/upload.php3.25 ▲0.0239.90 ▲4.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Crypto Price And Stats
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲8013.25 ▼1.391.98 ▲0.2242.26 ▼3.01
Dashboard /wp-admin2,218 ▲276.01 ▲1.10111.33 ▲5.4039.27 ▼8.07
Posts /wp-admin/edit.php2,101 ▲92.06 ▲0.0539.53 ▼4.7434.17 ▼6.93
Add New Post /wp-admin/post-new.php1,530 ▼423.38 ▲0.44673.69 ▲10.7355.06 ▼0.93
Media Library /wp-admin/upload.php1,403 ▲124.18 ▼0.1297.04 ▼20.9242.52 ▼5.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/crypto-price-and-stats/admin/partials/crypto-currency-file.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: choose_widget_style in wp-content/plugins/crypto-price-and-stats/public/partials/crypto-price-and-stats-public-display.php on line 66
    • > PHP Notice
      Undefined variable: choose_widget_style in wp-content/plugins/crypto-price-and-stats/public/partials/crypto-price-and-stats-public-display.php on line 45
    • > PHP Notice
      Undefined variable: choose_widget_style in wp-content/plugins/crypto-price-and-stats/public/partials/crypto-price-and-stats-public-display.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/crypto-price-and-stats/admin/partials/crypto-price-and-stats-admin-display.php:23
    • > PHP Notice
      Undefined variable: choose_widget_style in wp-content/plugins/crypto-price-and-stats/public/partials/crypto-price-and-stats-public-display.php on line 31
    • > PHP Notice
      Undefined variable: choose_widget_style in wp-content/plugins/crypto-price-and-stats/public/partials/crypto-price-and-stats-public-display.php on line 38
    • > PHP Notice
      Undefined variable: choose_widget_style in wp-content/plugins/crypto-price-and-stats/public/partials/crypto-price-and-stats-public-display.php on line 59
    • > PHP Notice
      Undefined variable: choose_widget_style in wp-content/plugins/crypto-price-and-stats/public/partials/crypto-price-and-stats-public-display.php on line 23
    • > PHP Notice
      Undefined variable: choose_widget_style in wp-content/plugins/crypto-price-and-stats/public/partials/crypto-price-and-stats-public-display.php on line 52

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

crypto-price-and-stats/crypto-price-and-stats.php Passed 13 tests

"Crypto Price And Stats" version 0.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
92 characters long description:
Crypto Price And Stats is a WordPress plugin displays live prices and stats of crypto coins.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected5,183 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP131855442,756
JavaScript163441,1571,449
CSS416610978

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.20MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) admin/img/coin-ticker.png21.72KB0.00KB▼ 100.00%
(invalid) admin/img/coin-ticker-list.png28.97KB0.00KB▼ 100.00%
(invalid) admin/img/coin-price-static-headline.png25.41KB0.00KB▼ 100.00%
(invalid) admin/img/coin-list-widget.png24.83KB0.00KB▼ 100.00%
(invalid) admin/img/coin-heatmap.png27.50KB0.00KB▼ 100.00%