56% open-orphanage

Code Review | Open Orphanage

WordPress plugin Open Orphanage scored56%from 54 tests.

About plugin

  • Plugin page: open-orphanage
  • Plugin version: 0.2.20190622a...
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2019
  • Latest release: Jun 23, 2019
  • Number of updates: 24
  • Update frequency: every 0.8 days
  • Top authors: lovejesus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,098 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.41MB] [CPU: ▼17.00ms] Passed 4 tests

Server-side resources used by Open Orphanage
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3542.87 ▼2.70
Dashboard /wp-admin11.49 ▲0.011,501,497.50 ▲9,159.54
Posts /wp-admin/edit.php3.83 ▲0.4354.89 ▼7.55
Add New Post /wp-admin/post-new.php3.57 ▼2.3643.22 ▼65.06
Media Library /wp-admin/upload.php3.64 ▲0.3744.20 ▲7.30
Add New /wp-admin/post-new.php?post_type=child_aleluya3.5640.33
Children /wp-admin/edit.php?post_type=child_aleluya3.7545.41

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Open Orphanage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,997 ▲23616.44 ▲1.85190.60 ▲188.1938.49 ▼7.42
Dashboard /wp-admin2,246 ▲665.67 ▲0.0295.61 ▲4.8863.50 ▲18.93
Posts /wp-admin/edit.php2,151 ▲512.02 ▲0.0039.65 ▲1.3440.89 ▲4.44
Add New Post /wp-admin/post-new.php6,407 ▲4,88127.88 ▲4.78887.04 ▲159.2738.62 ▼27.09
Media Library /wp-admin/upload.php1,444 ▲444.12 ▼0.06101.70 ▼9.6867.50 ▲18.73
Add New /wp-admin/post-new.php?post_type=child_aleluya6,49819.71920.7152.85
Children /wp-admin/edit.php?post_type=child_aleluya1,1631.9233.8835.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_oo_bible_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=child_aleluya
    • > Notice in wp-content/plugins/open-orphanage/admin-aleluya/oo-admin-child-aleluya.php+130
    Undefined index: oo_child_meta_box_nonce_aleluya
  • 28 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=child_aleluya
    • > Notice in wp-content/plugins/open-orphanage/includes-aleluya/custom-post-types-aleluya/child-custom-post-type-aleluya.php+117
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=child_aleluya
    • > Notice in wp-content/plugins/open-orphanage/includes-aleluya/custom-post-types-aleluya/child-custom-post-type-aleluya.php+178
    Trying to get property 'y' of non-object
  • 28 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=child_aleluya
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 28 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=child_aleluya
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=child_aleluya
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
Please fix the following items
  • 24× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/open-orphanage/includes-aleluya/shortcodes-aleluya/show-children-shortcode-aleluya.php
    • > /wp-content/plugins/open-orphanage/includes-aleluya/widgets-aleluya/bible-verse-widget-aleluya.php
    • > /wp-content/plugins/open-orphanage/admin-aleluya/oo-admin-aleluya.php
    • > /wp-content/plugins/open-orphanage/includes-aleluya/classes-aleluya/child-aleluya.php
    • > /wp-content/plugins/open-orphanage/includes-aleluya/roles-aleluya.php
    • > /wp-content/plugins/open-orphanage/includes-aleluya/supporters-aleluya.php
    • > /wp-content/plugins/open-orphanage/includes-aleluya/classes-aleluya/oo-stripe-charge-aleluya.php
    • > /wp-content/plugins/open-orphanage/includes-aleluya/classes-aleluya/classes-includes-aleluya.php
    • > /wp-content/plugins/open-orphanage/includes-aleluya/charges-aleluya.php
    • > /wp-content/plugins/open-orphanage/includes-aleluya/custom-post-types-aleluya/child-custom-post-type-aleluya.php
  • 102× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/Refund.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/Error/OAuth/OAuthBase.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/PaymentMethod.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/Discount.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/CreditNote.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/Terminal/Reader.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/Issuing/Authorization.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\InvalidRequest' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/Error/RateLimit.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/CountrySpec.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/lib/Issuing/Transaction.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=child_aleluya
    • > Network (severe)
    wp-content/uploads/oo-aleluya/thumbs-aleluya/11-192x192-aleluya.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=child_aleluya
    • > Network (severe)
    http://perffection.com/img/favicon32-aleluya.png?7aleluya - Failed to load resource: the server responded with a status of 503 (Service Unavailable)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #2 (✝ Editing a Child post), #3 (✝ Open Orphanage settings)
The official readme.txt might help

open-orphanage/open-orphanage.php 92% from 13 tests

The entry point to "Open Orphanage" version 0.2.20190622a... is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "0.2.20190622a...")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
These items require your attention
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/open-orphanage/vendor/stripe/stripe-php/data/ca-certificates.crt
15,020 lines of code in 175 files:
LanguageFilesBlank linesComment linesLines of code
JSON5006,961
PHP1551,5844,0476,870
Markdown22870648
JavaScript6128210418
PO File1242661
CSS392431
Sass36131

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.06
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces2
Traits7
Classes120
▷ Abstract classes75.83%
▷ Concrete classes11394.17%
▷ Final classes00.00%
Methods371
▷ Static methods14438.81%
▷ Public methods32988.68%
▷ Protected methods133.50%
▷ Private methods297.82%
Functions79
▷ Named functions7189.87%
▷ Anonymous functions810.13%
Constants482
▷ Global constants30.62%
▷ Class constants47999.38%
▷ Public constants479100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected