10% compassion-sponsored-child

Code Review | Compassion Sponsored Child

WordPress plugin Compassion Sponsored Child scored 10% from 54 tests.

About plugin

  • Plugin page: compassion-sponso...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Sep 18, 2014
  • Latest release: Sep 18, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: gatsby360 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 760 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/compassion-sponsored-child/com-sponsored-child.php+30
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.68ms] Passed 4 tests

This is a short check of server-side resources used by Compassion Sponsored Child
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.66 ▼37.22
Dashboard /wp-admin2.05 ▼1.265.48 ▼42.94
Posts /wp-admin/edit.php2.05 ▼1.315.46 ▼40.89
Add New Post /wp-admin/post-new.php2.05 ▼3.845.40 ▼81.65
Media Library /wp-admin/upload.php2.05 ▼1.185.02 ▼30.70

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_wp_compassion_sponsored_child
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Compassion Sponsored Child
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.53 ▼0.7712.56 ▲10.6036.30 ▼13.52
Dashboard /wp-admin2,206 ▲155.86 ▲0.9996.48 ▼1.8437.99 ▼6.05
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0038.23 ▲3.2236.01 ▲1.62
Add New Post /wp-admin/post-new.php1,542 ▲718.43 ▼4.58615.67 ▼43.7250.20 ▼2.18
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0194.33 ▼8.9144.85 ▲0.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/compassion-sponsored-child/com-sponsored-child.php+30
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_wp_compassion_sponsored_child
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/compassion-sponsored-child/templates/banner.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/compassion-sponsored-child/com-sponsored-child.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/compassion-sponsored-child/com-sponsored-child-widget-class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: plugin, shortcode, widget

compassion-sponsored-child/com-sponsored-child.php 92% from 13 tests

The main PHP script in "Compassion Sponsored Child" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("compassion-sponsored-child.php" instead of "com-sponsored-child.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin239 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript214191
PHP3132936
CSS10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/button.png2.63KB1.55KB▼ 41.02%