83% cryptowp

Code Review | Crypto Price Widgets - CryptoWP

WordPress plugin Crypto Price Widgets - CryptoWP scored83%from 54 tests.

About plugin

  • Plugin page: cryptowp
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0
  • WordPress version: 6.3.1
  • First release: Aug 6, 2018
  • Latest release: May 16, 2022
  • Number of updates: 87
  • Update frequency: every 15.9 days
  • Top authors: alexmangini (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /24,537 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▲0.95ms] Passed 4 tests

A check of server-side resources used by Crypto Price Widgets - CryptoWP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1539.26 ▼0.31
Dashboard /wp-admin3.45 ▲0.1546.16 ▲2.80
Posts /wp-admin/edit.php3.57 ▲0.2145.92 ▼3.23
Add New Post /wp-admin/post-new.php6.03 ▲0.1592.57 ▲6.62
Media Library /wp-admin/upload.php3.38 ▲0.1536.98 ▲4.53

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_cryptowp_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
cryptowp
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Crypto Price Widgets - CryptoWP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4313.29 ▼1.021.75 ▼0.0342.47 ▲3.23
Dashboard /wp-admin2,218 ▲264.81 ▼0.12101.30 ▼23.9539.53 ▼3.63
Posts /wp-admin/edit.php2,098 ▲91.99 ▲0.0034.15 ▼3.0534.62 ▲5.07
Add New Post /wp-admin/post-new.php1,546 ▲3223.33 ▲5.88622.36 ▼58.1250.79 ▼3.92
Media Library /wp-admin/upload.php1,403 ▲154.23 ▲0.0399.16 ▼9.7543.19 ▼0.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_cryptowp_widget
    • cryptowp
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 19× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/cryptowp/templates/cryptowp.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/cryptowp/templates/admin/settings-coin.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/cryptowp/templates/admin/settings-page.php:3
    • > PHP Notice
      Undefined variable: show in wp-content/plugins/cryptowp/templates/cryptowp-text.php on line 12
    • > PHP Notice
      Undefined variable: show in wp-content/plugins/cryptowp/templates/cryptowp-text.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cryptowp_strings() in wp-content/plugins/cryptowp/admin/admin.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cryptowp/admin/widget.php:8
    • > PHP Notice
      Undefined variable: show in wp-content/plugins/cryptowp/templates/cryptowp-text.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cryptowp/templates/widget.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/cryptowp/templates/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === cryptowp === )
  • Tags: There are too many tags (15 tag instead of maximum 10)
Please take inspiration from this readme.txt

cryptowp/cryptowp.php 92% from 13 tests

The main PHP file in "Crypto Price Widgets - CryptoWP" ver. 1.3.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 216 characters long)

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
Good job! No executable or dangerous file extensions detected1,162 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13205258748
CSS210637314
JavaScript21926100

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity18.25
▷ Minimum class complexity7.00
▷ Maximum class complexity35.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin