83% bitcoinnews

Code Review | Bitcoin News

WordPress plugin Bitcoin News scored83%from 54 tests.

About plugin

  • Plugin page: bitcoinnews
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2018
  • Latest release: Jun 16, 2023
  • Number of updates: 17
  • Update frequency: every 112.2 days
  • Top authors: thebitcoinnews (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /8,950 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.26ms] Passed 4 tests

A check of server-side resources used by Bitcoin News
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1335.54 ▼0.51
Dashboard /wp-admin3.44 ▲0.1449.53 ▲1.92
Posts /wp-admin/edit.php3.55 ▲0.2048.17 ▲3.18
Add New Post /wp-admin/post-new.php6.02 ▲0.1394.09 ▼2.76
Media Library /wp-admin/upload.php3.36 ▲0.1334.98 ▲0.32

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
widget_tbcnews_plugin_widget
tbcnews_plugin_version
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
tbcnews_plugin_version_taken
widget_theysaidso_widget

Browser metrics Passed 4 tests

Bitcoin News: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.19 ▼1.132.08 ▲0.4239.04 ▼5.25
Dashboard /wp-admin2,220 ▲354.86 ▼0.99100.92 ▼0.8241.03 ▼2.87
Posts /wp-admin/edit.php2,106 ▲172.03 ▲0.0439.31 ▲0.3834.52 ▲2.46
Add New Post /wp-admin/post-new.php1,540 ▲1223.22 ▲4.93635.92 ▲18.6651.83 ▼2.72
Media Library /wp-admin/upload.php1,405 ▲144.22 ▼0.0199.21 ▲2.2841.18 ▼2.58

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 did not uninstall successfully, leaving 9 options in the database
    • widget_tbcnews_plugin_widget
    • widget_recent-comments
    • tbcnews_plugin_version
    • tbcnews_plugin_version_taken
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bitcoinnews/tbcnews-plugin-utils.php
    • > /wp-content/plugins/bitcoinnews/tbcnews-plugin-widget.php
    • > /wp-content/plugins/bitcoinnews/tbcnews-plugin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (18 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (First of all, activate the Bitcoin News Plugin.), #2 (Then you can create your Bitcoin News by generating the shortcode. Choose the name, number of headlines, keywords and other settings.), #3 (Copy your shortcode and paste it into a page or a post.), #5 (If you want your Bitcoin News to appear in sidebar, it's easier to use the Bitcoin News widget.), #6 (An example of a Bitcoin News feed on a page.)
You can look at the official readme.txt

bitcoinnews/tbcnews-plugin.php 85% from 13 tests

The primary PHP file in "Bitcoin News" version 1.0.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bitcoinnews.php" instead of "tbcnews-plugin.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 267 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected760 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3119143745
CSS10015

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity33.00
▷ Minimum class complexity4.00
▷ Maximum class complexity80.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods2365.71%
▷ Protected methods00.00%
▷ Private methods1234.29%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin