10% easy-coin-table

Code Review | Easy Coin Table

WordPress plugin Easy Coin Table scored10%from 54 tests.

About plugin

  • Plugin page: easy-coin-table
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.6
  • WordPress version: 6.3.1
  • First release: Aug 22, 2018
  • Latest release: Sep 23, 2019
  • Number of updates: 10
  • Update frequency: every 39.8 days
  • Top authors: hoangthinhnd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,414 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/easy-coin-table/includes/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; ht_plugin_widget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼55.18ms] Passed 4 tests

An overview of server-side resources used by Easy Coin Table
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.32 ▼35.58
Dashboard /wp-admin2.09 ▼1.215.98 ▼46.00
Posts /wp-admin/edit.php2.09 ▼1.268.65 ▼40.33
Add New Post /wp-admin/post-new.php2.09 ▼3.805.78 ▼98.81
Media Library /wp-admin/upload.php2.09 ▼1.145.74 ▼30.17
Easy Coin Table /wp-admin/options-general.php?page=easy-coin-table2.098.93

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2,250 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_ht_plugin_widget
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Easy Coin Table
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3713.69 ▼0.941.72 ▼0.0945.13 ▲0.95
Dashboard /wp-admin2,225 ▲194.84 ▼0.07110.20 ▲3.7039.43 ▼0.94
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0341.47 ▲3.0836.07 ▼2.54
Add New Post /wp-admin/post-new.php1,529 ▲317.57 ▲0.07641.00 ▼56.4364.05 ▲10.57
Media Library /wp-admin/upload.php1,404 ▲14.26 ▲0.0295.33 ▼3.5042.67 ▼4.82
Easy Coin Table /wp-admin/options-general.php?page=easy-coin-table8402.0122.4632.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/easy-coin-table/includes/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; ht_plugin_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_ht_plugin_widget
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=easy-coin-table
    • > Deprecated in wp-content/plugins/easy-coin-table/includes/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; ht_plugin_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=easy-coin-table
    • > Deprecated in wp-content/plugins/easy-coin-table/includes/widget.php+68
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=easy-coin-table
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ht_plugin_widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=easy-coin-table
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=easy-coin-table
    • > Warning in wp-content/plugins/easy-coin-table/includes/shortcode.php+5
    file_get_contents(https://api.coinmarketcap.com/v1/ticker/?limit=10): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/easy-coin-table/bitcoin-plugin.php
    • > /wp-content/plugins/easy-coin-table/index.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/easy-coin-table/includes/shortcode.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-coin-table/includes/widget.php:2

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (https://tygiacoin.com/wp-content/uploads/2018/08/screenshot-1.png), #2 (https://tygiacoin.com/wp-content/uploads/2018/08/screenshot-2.png), #3 (https://tygiacoin.com/wp-content/uploads/2018/08/screenshot-3.png)
Please take inspiration from this readme.txt

easy-coin-table/bitcoin-plugin.php 92% from 13 tests

The principal PHP file in "Easy Coin Table" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-coin-table.php" instead of "bitcoin-plugin.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
Success! There were no dangerous files found in this plugin791 lines of code in 509 files:
LanguageFilesBlank linesComment linesLines of code
SVG50402576
PHP4108168
CSS12047

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1658 compressed PNG files occupy 3.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/asset/coins-logos/html-coin.png1.92KB1.89KB▼ 1.12%
includes/asset/coins-logos/apr-coin.png1.75KB1.74KB0.33%
includes/asset/coins-logos/steneum-coin.png1.87KB1.80KB▼ 3.60%
includes/asset/coins-logos/swarm-city.png0.88KB0.88KB0.00%
includes/asset/coins-logos/kickico.png1.92KB1.90KB▼ 0.97%