10% scholarship-browser

Code Review | Scholarship Browser

WordPress plugin Scholarship Browser scored10%from 54 tests.

About plugin

  • Plugin page: scholarship-browser
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.2
  • WordPress version: 6.3.1
  • First release: Aug 21, 2013
  • Latest release: Sep 8, 2013
  • Number of updates: 8
  • Update frequency: every 5.8 days
  • Top authors: pfauenauge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,084 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/scholarship-browser/widget.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; SbWidget has a deprecated constructor

Server metrics [RAM: ▼1.72MB] [CPU: ▼50.95ms] Passed 4 tests

A check of server-side resources used by Scholarship Browser
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1810.77 ▼30.99
Dashboard /wp-admin2.30 ▼1.0510.98 ▼52.59
Posts /wp-admin/edit.php2.30 ▼1.0611.69 ▼38.25
Add New Post /wp-admin/post-new.php2.30 ▼3.5910.35 ▼81.95
Media Library /wp-admin/upload.php2.30 ▼0.9311.39 ▼23.06

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_sbwidget
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Scholarship Browser: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.60 ▼1.057.07 ▲5.2942.81 ▲1.75
Dashboard /wp-admin2,206 ▲185.82 ▲0.00102.23 ▼6.7442.07 ▼0.71
Posts /wp-admin/edit.php2,092 ▲61.99 ▼0.0236.63 ▲0.3035.47 ▲2.05
Add New Post /wp-admin/post-new.php1,533 ▼923.09 ▲4.83660.55 ▲41.5764.20 ▲14.90
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0195.52 ▼11.9341.96 ▼3.27

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SbWidget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_sbwidget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/scholarship-browser/scholarship-browser.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/scholarship-browser/widget.php:9

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Sidebar with the search filters), #2 (Sidebar with different style), #3 (Widget administration - selecting categories and options)
The official readme.txt might help

scholarship-browser/scholarship-browser.php Passed 13 tests

The main PHP script in "Scholarship Browser" version 1.3 is automatically included on every request by WordPress
94 characters long description:
Providing a Widget to show and interactively browse scholarships for German exchange students.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,022 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS37016662
PHP34697217
JavaScript1273103
PO File1151840

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity9.75
▷ Minimum method complexity1.00
▷ Maximum method complexity19.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png6.02KB3.94KB▼ 34.54%
images/check-micro.png0.23KB0.22KB▼ 4.26%
images/flags-high-quality.png77.17KB25.50KB▼ 66.96%
screenshot-3.png14.75KB8.20KB▼ 44.42%
screenshot-1.png17.86KB7.74KB▼ 56.69%