84% cryptocurrency-widgets-pack

Code Review | Cryptocurrency Widgets Pack

WordPress plugin Cryptocurrency Widgets Pack scored84%from 54 tests.

About plugin

  • Plugin page: cryptocurrency-wi...
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 9, 2018
  • Latest release: Oct 10, 2023
  • Number of updates: 41
  • Update frequency: every 48.3 days
  • Top authors: blocksera (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

1,000+ active /35,908 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼4.60ms] 50% from 4 tests

Analyzing server-side resources used by Cryptocurrency Widgets Pack
Please have a look at the following items
  • RAM: The total memory usage must be kept under 10MB (currently 14.20MB on /wp-admin/post-new.php?post_type=mcwp)
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,212.88ms on /wp-admin/post-new.php?post_type=mcwp)
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2746.30 ▲3.81
Dashboard /wp-admin3.56 ▲0.2249.95 ▼16.86
Posts /wp-admin/edit.php3.68 ▲0.3250.22 ▼1.51
Add New Post /wp-admin/post-new.php6.17 ▲0.28104.00 ▼3.85
Media Library /wp-admin/upload.php3.49 ▲0.2639.98 ▲8.10
Add New /wp-admin/post-new.php?post_type=mcwp14.201,212.88
Upgrade to PRO  ➤ /wp-admin/edit.php?post_type=mcwp&page=mcwp-premium3.5237.02
All Widgets /wp-admin/edit.php?post_type=mcwp3.5335.52

Server storage [IO: ▲0.80MB] [DB: ▲0.25MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 71 new files
Database: 1 new table, 8 new options
New tables
wp_mcwp_coins
New WordPress options
mcwp-top-notice
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
mcwp-notice
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Cryptocurrency Widgets Pack
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲20013.94 ▼0.0610.06 ▲7.9737.42 ▼6.47
Dashboard /wp-admin2,270 ▲935.96 ▲0.2795.66 ▼1.2241.04 ▼2.00
Posts /wp-admin/edit.php2,185 ▲852.39 ▲0.3845.97 ▲9.0138.94 ▲4.32
Add New Post /wp-admin/post-new.php1,581 ▲3423.70 ▲0.34611.99 ▼73.7833.86 ▼17.27
Media Library /wp-admin/upload.php1,478 ▲784.65 ▲0.34103.20 ▼1.6345.27 ▼2.85
Add New /wp-admin/post-new.php?post_type=mcwp12,5964.00210.75247.88
Upgrade to PRO  ➤ /wp-admin/edit.php?post_type=mcwp&page=mcwp-premium1,5252.1226.5169.95
All Widgets /wp-admin/edit.php?post_type=mcwp1,1612.3534.6330.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • mcwp-notice
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • mcwp-top-notice
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined property: stdClass::$crypto_ticker_position in wp-content/plugins/cryptocurrency-widgets-pack/includes/settings.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cryptocurrency-widgets-pack/includes/duplicate.php:97
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/cryptocurrency-widgets-pack/includes/settings.php on line 5
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/cryptocurrency-widgets-pack/includes/settings.php on line 5
    • > PHP Notice
      Trying to get property 'crypto_ticker' of non-object in wp-content/plugins/cryptocurrency-widgets-pack/includes/settings.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cryptocurrency-widgets-pack/includes/settings.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
7 plugin tags: crypto widgets, cryptocurrency, shortcodes, table, bitcoin price...

cryptocurrency-widgets-pack/cryptocurrency-widgets-pack.php Passed 13 tests

Analyzing the main PHP file in "Cryptocurrency Widgets Pack" version 2.0.1
86 characters long description:
Price ticker, table, cards, label widget for all cryptocurrencies using Coingecko API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected4,897 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS469522,666
PHP6257651,476
JavaScript78319692
SVG322063

PHP code Passed 2 tests

This is a very shot review 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.37
Average class complexity48.67
▷ Minimum class complexity10.00
▷ Maximum class complexity81.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods37.32%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
45 PNG files occupy 0.43MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/pro-settings/list-settings.png11.47KB4.08KB▼ 64.46%
assets/public/img/error.png112.35KB49.48KB▼ 55.96%
assets/admin/cards/card2.png2.23KB1.02KB▼ 53.99%
assets/pro-settings/realtime-settings.png6.40KB2.18KB▼ 65.89%
assets/admin/images/star.png31.27KB10.61KB▼ 66.08%