10% wp-virgin-money-giving

Code Review | WordPress Virgin Money Giving

WordPress plugin WordPress Virgin Money Giving scored 10% from 54 tests.

About plugin

  • Plugin page: wp-virgin-money-g...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.9.5
  • WordPress version: 6.3.1
  • First release: Mar 29, 2016
  • Latest release: May 10, 2018
  • Number of updates: 17
  • Update frequency: every 45.8 days
  • Top authors: erichmond (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active / 5,178 total downloads

Benchmarks

Plugin footprint 58% 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 validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.82ms] Passed 4 tests

Server-side resources used by WordPress Virgin Money Giving
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.99 ▼2.27
Dashboard /wp-admin3.45 ▲0.1445.87 ▼3.90
Posts /wp-admin/edit.php3.56 ▲0.2048.07 ▼1.89
Add New Post /wp-admin/post-new.php6.05 ▲0.1686.54 ▼15.21
Media Library /wp-admin/upload.php3.37 ▲0.1438.12 ▼0.55
Virgin Money Giving /wp-admin/options-general.php?page=virgin-money-giving-settings3.3433.18

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_foo_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Virgin Money Giving
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲18413.60 ▼1.025.53 ▲3.6242.22 ▼2.79
Dashboard /wp-admin2,220 ▲354.88 ▼1.0298.38 ▼2.7538.65 ▼4.44
Posts /wp-admin/edit.php2,103 ▲112.04 ▲0.0541.70 ▼3.4335.59 ▼3.37
Add New Post /wp-admin/post-new.php1,524 ▲1023.49 ▲6.00660.68 ▼36.2857.32 ▲0.07
Media Library /wp-admin/upload.php1,402 ▲144.32 ▲0.1897.33 ▼10.8242.39 ▼8.92
Virgin Money Giving /wp-admin/options-general.php?page=virgin-money-giving-settings8762.0422.8227.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_foo_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-virgin-money-giving/public/partials/wp-virgin-money-giving-public-display.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-virgin-money-giving/public/partials/test-virgin-api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Virgin_Money_Giving_Admin' not found in wp-content/plugins/wp-virgin-money-giving/admin/partials/wp-virgin-money-giving-admin-display.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-virgin-money-giving/includes/class-wp-fundraisers-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-virgin-money-giving === )
You can look at the official readme.txt

wp-virgin-money-giving/wp-virgin-money-giving.php Passed 13 tests

The main PHP script in "WordPress Virgin Money Giving" version 1.1.6 is automatically included on every request by WordPress
92 characters long description:
A plugin that uses the Virgin Money Giving API to feed data in to your website via a widget.

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
There were no executable files found in this plugin773 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15316658642
CSS2159107
JavaScript2166024

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods49
▷ Static methods24.08%
▷ Public methods4183.67%
▷ Protected methods36.12%
▷ Private methods510.20%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/virgin-money-giving.png13.12KB4.28KB▼ 67.41%
admin/img/virgin-money-giving.png5.07KB4.74KB▼ 6.51%