10% top-coin

Code Review | Top Coin

WordPress plugin Top Coin scored10%from 54 tests.

About plugin

  • Plugin page: top-coin
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2017
  • Latest release: Dec 11, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: huykiradotnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,325 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/top-coin/includes/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; BHK_plugin_widget has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼57.66ms] Passed 4 tests

This is a short check of server-side resources used by Top Coin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.22 ▼40.26
Dashboard /wp-admin2.09 ▼1.255.95 ▼62.80
Posts /wp-admin/edit.php2.09 ▼1.275.82 ▼43.20
Add New Post /wp-admin/post-new.php2.09 ▼3.806.60 ▼84.38
Media Library /wp-admin/upload.php2.09 ▼1.147.83 ▼24.75
Top Coin /wp-admin/options-general.php?page=top-coin2.095.80

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_bhk_plugin_widget
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Top Coin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.34 ▼0.011.70 ▼0.2342.88 ▼0.87
Dashboard /wp-admin2,196 ▲195.52 ▼0.0583.48 ▼16.8138.39 ▼4.53
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0439.02 ▲2.0738.98 ▲2.55
Add New Post /wp-admin/post-new.php1,535 ▲723.36 ▲0.31669.86 ▼21.0962.32 ▲2.11
Media Library /wp-admin/upload.php1,404 ▲14.18 ▲0.00108.38 ▲2.1447.32 ▲3.58
Top Coin /wp-admin/options-general.php?page=top-coin8461.9822.0958.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/top-coin/includes/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; BHK_plugin_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_bhk_plugin_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=top-coin
    • > Deprecated in wp-content/plugins/top-coin/includes/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; BHK_plugin_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=top-coin
    • > Deprecated in wp-content/plugins/top-coin/includes/widget.php+67
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=top-coin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in BHK_plugin_widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=top-coin
    • > 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=top-coin
    • > Warning in wp-content/plugins/top-coin/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 | 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/top-coin/bitcoin-plugin.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/top-coin/includes/shortcode.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/top-coin/includes/widget.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
3 plugin tags: top coin, bitcoin plugin, currency rankings

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

The main PHP file in "Top Coin" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("top-coin.php" instead of "bitcoin-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin199 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP358155
CSS12044

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin