83% wopo-cryptocurrency-widget

Code Review | WoPo Cryptocurrency Widget

WordPress plugin WoPo Cryptocurrency Widget scored83%from 54 tests.

About plugin

  • Plugin page: wopo-cryptocurren...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Apr 21, 2020
  • Latest release: Jun 18, 2021
  • Number of updates: 3
  • Update frequency: every 141.3 days
  • Top authors: thanhbinh8703 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,844 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲40.61MB] [CPU: ▲72.72ms] 75% from 4 tests

This is a short check of server-side resources used by WoPo Cryptocurrency Widget
It is recommended to improve the following
  • Extra RAM: Extra memory usage should kept under 5MB (currently 40.61MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /44.57 ▲41.11128.69 ▲83.66
Dashboard /wp-admin44.58 ▲41.24147.06 ▲81.17
Posts /wp-admin/edit.php44.58 ▲41.23124.78 ▲68.41
Add New Post /wp-admin/post-new.php44.74 ▲38.85174.24 ▲64.14
Media Library /wp-admin/upload.php44.58 ▲41.36115.93 ▲77.14

Server storage [IO: ▲3.45MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/wopo-cryptocurrency-widget/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_wopo-cryptocurrency-widget

Browser metrics Passed 4 tests

An overview of browser requirements for WoPo Cryptocurrency Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.23 ▼1.031.81 ▼0.0141.87 ▼1.90
Dashboard /wp-admin2,221 ▲154.84 ▼1.06103.09 ▼1.4143.97 ▲4.38
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0638.96 ▲1.9339.77 ▲6.16
Add New Post /wp-admin/post-new.php1,544 ▲420.91 ▼1.97656.75 ▼14.1543.31 ▼11.52
Media Library /wp-admin/upload.php1,400 ▼34.22 ▼0.0498.41 ▼5.7446.38 ▼6.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_wopo-cryptocurrency-widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wopo-cryptocurrency-widget/wopo-cryptocurrency-widget.php:17

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: widget, coinmarketcap, cryptocurrency, wopo

wopo-cryptocurrency-widget/wopo-cryptocurrency-widget.php 77% from 13 tests

"WoPo Cryptocurrency Widget" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "5.2")
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.2.4" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin126 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13428125
JSON1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.33
▷ Minimum method complexity3.00
▷ Maximum method complexity7.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 functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin