10% dogeapi-donate-widget

Code Review | DogeAPI Donate Widget

WordPress plugin DogeAPI Donate Widget scored10%from 54 tests.

About plugin

  • Plugin page: dogeapi-donate-wi...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Jan 29, 2014
  • Latest release: Feb 2, 2014
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: romulcah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,191 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/dogeapi-donate-widget/dogeAPI.php+151
    Methods with the same name as their class will not be constructors in a future version of PHP; dogeapi_donate_plugin has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼58.60ms] Passed 4 tests

This is a short check of server-side resources used by DogeAPI Donate Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.375.08 ▼37.66
Dashboard /wp-admin2.12 ▼1.236.77 ▼59.48
Posts /wp-admin/edit.php2.12 ▼1.245.72 ▼43.42
Add New Post /wp-admin/post-new.php2.12 ▼3.776.72 ▼93.85
Media Library /wp-admin/upload.php2.12 ▼1.115.06 ▼32.04
DogeAPI /wp-admin/options-general.php?page=DogeAPI2.126.15

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_dogeapi_donate_plugin
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for DogeAPI Donate Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.39 ▼0.171.60 ▼0.2646.88 ▲3.56
Dashboard /wp-admin2,202 ▲315.62 ▲0.0891.15 ▼5.8841.05 ▼1.16
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0138.64 ▲1.6635.08 ▲0.66
Add New Post /wp-admin/post-new.php1,529 ▲323.17 ▼0.13651.29 ▼50.2351.20 ▼20.65
Media Library /wp-admin/upload.php1,404 ▲44.28 ▲0.0297.67 ▼10.5641.38 ▼4.78
DogeAPI /wp-admin/options-general.php?page=DogeAPI8462.0023.6929.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/dogeapi-donate-widget/dogeAPI.php+151
    Methods with the same name as their class will not be constructors in a future version of PHP; dogeapi_donate_plugin has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_dogeapi_donate_plugin
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=DogeAPI
    • > Deprecated in wp-content/plugins/dogeapi-donate-widget/dogeAPI.php+151
    Methods with the same name as their class will not be constructors in a future version of PHP; dogeapi_donate_plugin has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=DogeAPI
    • > Deprecated in wp-content/plugins/dogeapi-donate-widget/dogeAPI.php+250
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=DogeAPI
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in dogeapi_donate_plugin is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=DogeAPI
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=DogeAPI
    • > Notice in wp-content/plugins/dogeapi-donate-widget/dogeAPI.php+14
    Undefined index: action
    • > GET request to /wp-admin/options-general.php?page=DogeAPI
    • > Notice in wp-content/plugins/dogeapi-donate-widget/dogeAPI.php+35
    Undefined variable: message

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dogeapi-donate-widget/dogeAPI.php:79

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Donate widget with received total) image missing
The official readme.txt might help

dogeapi-donate-widget/dogeAPI.php 92% from 13 tests

The entry point to "DogeAPI Donate Widget" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dogeapi-donate-widget.php" instead of "dogeAPI.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin208 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15122179
Markdown118029

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
doegapi-donate.png1.85KB0.98KB▼ 46.80%
screenshot-1.png39.18KB11.68KB▼ 70.19%