79% crypto-prices

Code Review | Crypto Prices

WordPress plugin Crypto Prices scored79%from 54 tests.

About plugin

  • Plugin page: crypto-prices
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2019
  • Latest release: Mar 20, 2019
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: lerougeliet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,262 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Crypto Prices
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.81 ▼2.82
Dashboard /wp-admin3.32 ▲0.0255.73 ▲5.28
Posts /wp-admin/edit.php3.37 ▲0.0150.26 ▼0.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.56 ▼8.43
Media Library /wp-admin/upload.php3.24 ▲0.0135.94 ▼1.87
Crypto Prices /wp-admin/options-general.php?page=crypto-prices3.2534.53

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
crypto_prices_install_date
db_upgraded
can_compress_scripts
crypto_prices_last_fetch_upsell
widget_theysaidso_widget
crypto_prices_options

Browser metrics Passed 4 tests

Checking browser requirements for Crypto Prices
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.70 ▲0.211.93 ▲0.3545.52 ▲3.92
Dashboard /wp-admin2,196 ▲165.59 ▼0.0586.53 ▼5.9040.83 ▼2.52
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0438.50 ▼1.5136.45 ▼2.03
Add New Post /wp-admin/post-new.php1,531 ▼423.07 ▲5.01663.68 ▼7.9160.33 ▼8.12
Media Library /wp-admin/upload.php1,395 ▼84.20 ▼0.0397.10 ▼18.7745.15 ▼3.40
Crypto Prices /wp-admin/options-general.php?page=crypto-prices9111.9929.3930.83

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=crypto-prices
    • > Warning in wp-content/plugins/crypto-prices/admin/partials/admin-display.php+75
    Invalid argument supplied for foreach()

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/crypto-prices/includes/class-loader.php:123
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/crypto-prices/admin/partials/admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: crypto, ripple, cryptocurrency, ethereum, bitcoin

crypto-prices/crypto-prices.php Passed 13 tests

"Crypto Prices" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
52 characters long description:
Add inline cryptocurrency prices to your blog posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin554 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12103530512
CSS24042

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods721.88%
▷ Public methods2887.50%
▷ Protected methods00.00%
▷ Private methods412.50%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin