10% grants-for-nonprofits-widget

Code Review | Grants for Nonprofits Widget

WordPress plugin Grants for Nonprofits Widget scored10%from 54 tests.

About plugin

  • Plugin page: grants-for-nonpro...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0
  • WordPress version: 6.3.1
  • First release: Sep 16, 2014
  • Latest release: Sep 30, 2014
  • Number of updates: 8
  • Update frequency: every 2.1 days
  • Top authors: kutu62 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /5,773 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/grants-for-nonprofits-widget/grantfeed.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; grants_Widget has a deprecated constructor

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

Server-side resources used by Grants for Nonprofits Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.97 ▼35.43
Dashboard /wp-admin2.08 ▼1.267.11 ▼56.79
Posts /wp-admin/edit.php2.08 ▼1.276.08 ▼49.14
Add New Post /wp-admin/post-new.php2.08 ▼3.807.14 ▼104.79
Media Library /wp-admin/upload.php2.08 ▼1.155.57 ▼32.76

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_grants-widget
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Grants for Nonprofits Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.121.77 ▲0.1343.57 ▲2.61
Dashboard /wp-admin2,195 ▲155.64 ▲0.1087.91 ▼5.4742.77 ▼0.19
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0534.93 ▼2.8334.47 ▼1.19
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▼0.82635.10 ▼3.6146.59 ▼15.69
Media Library /wp-admin/upload.php1,403 ▲64.21 ▲0.0198.28 ▼2.5345.08 ▼1.21

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/grants-for-nonprofits-widget/grantfeed.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; grants_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_grants-widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/grants-for-nonprofits-widget/grantfeed.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

grants-for-nonprofits-widget/grantfeed.php 92% from 13 tests

Analyzing the main PHP file in "Grants for Nonprofits Widget" version 1.1
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("grants-for-nonprofits-widget.php" instead of "grantfeed.php")

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
Success! There were no dangerous files found in this plugin37 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP103337

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ 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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin