10% quarkwidget

Code Review | QuarkWidget

WordPress plugin QuarkWidget scored 10% from 54 tests.

About plugin

  • Plugin page: quarkwidget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2014
  • Latest release: Feb 18, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: toasterthegamer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 739 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/quarkwidget/qrkdonation.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; qrkdonation_widget has a deprecated constructor

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

Analyzing server-side resources used by QuarkWidget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.57 ▼34.43
Dashboard /wp-admin2.08 ▼1.234.84 ▼41.52
Posts /wp-admin/edit.php2.08 ▼1.285.56 ▼39.39
Add New Post /wp-admin/post-new.php2.08 ▼3.815.49 ▼90.46
Media Library /wp-admin/upload.php2.08 ▼1.155.24 ▼29.13
QuarkCoin Donation Button /wp-admin/options-general.php?page=QuarkCoin-Donation-Button2.084.66

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_qrkdonationwidget-widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for QuarkWidget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.54 ▼1.058.12 ▲6.3943.65 ▼6.95
Dashboard /wp-admin2,207 ▲164.86 ▼0.03113.09 ▲11.7141.43 ▼1.71
Posts /wp-admin/edit.php2,096 ▲41.97 ▼0.0136.61 ▼3.5429.86 ▼5.17
Add New Post /wp-admin/post-new.php1,536 ▲323.66 ▲0.34660.61 ▼0.4451.17 ▼2.87
Media Library /wp-admin/upload.php1,392 ▲14.29 ▲0.0492.52 ▼8.7340.32 ▼4.54
QuarkCoin Donation Button /wp-admin/options-general.php?page=QuarkCoin-Donation-Button7772.0527.9728.22

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
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/quarkwidget/qrkdonation.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; qrkdonation_widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_qrkdonationwidget-widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=QuarkCoin-Donation-Button
    • > Deprecated in wp-content/plugins/quarkwidget/qrkdonation.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; qrkdonation_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=QuarkCoin-Donation-Button
    • > Deprecated in wp-content/plugins/quarkwidget/qrkdonation.php+64
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=QuarkCoin-Donation-Button
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in qrkdonation_widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=QuarkCoin-Donation-Button
    • > Notice in wp-content/plugins/quarkwidget/qrkdonation_admin.php+2
    Undefined index: qrkdon_hidden

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 take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/quarkwidget/qrkdonation_admin.php:11
    • > PHP Notice
      Undefined index: qrkdon_hidden in wp-content/plugins/quarkwidget/qrkdonation_admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quarkwidget/qrkdonation.php:17

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: donate, button, coin, quark

quarkwidget/qrkdonation.php 92% from 13 tests

The entry point to "QuarkWidget" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("quarkwidget.php" instead of "qrkdonation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,588 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP166115162,299
JavaScript11431236
CSS1142953

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity22.82
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods136
▷ Static methods6144.85%
▷ Public methods13498.53%
▷ Protected methods00.00%
▷ Private methods21.47%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants32
▷ Global constants32100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon_wallet.png0.62KB0.60KB▼ 3.13%
icon_quarkcoin.png3.66KB0.98KB▼ 73.25%
icon_qrcode.png0.31KB0.26KB▼ 14.97%