58% easy-prayer

Code Review | Easy Prayer

WordPress plugin Easy Prayer scored 58% from 54 tests.

About plugin

  • Plugin page: easy-prayer
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-5.3.2
  • WordPress version: 5.9.2
  • First release: Mar 25, 2020
  • Latest release: Sep 9, 2020
  • Number of updates: 11
  • Update frequency: every 15.3 days
  • Top authors: cromer12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 411 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.46MB] [CPU: ▼286.60ms] Passed 4 tests

This is a short check of server-side resources used by Easy Prayer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5158.60 ▲9.30
Dashboard /wp-admin3.91 ▲0.5142.89 ▲12.09
Posts /wp-admin/edit.php4.14 ▲0.5040.88 ▲4.69
Add New Post /wp-admin/post-new.php7.38 ▲0.4194.85 ▼1,163.65
Media Library /wp-admin/upload.php3.71 ▲0.4127.51 ▲3.26
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius4.0629.45

Server storage [IO: ▲32.64MB] [DB: ▲0.01MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • Total filesystem usage must be limited to 25MB (currently using 32.64MB)
Filesystem: 926 new files
Database: 3 new tables, 5 new options
New tables
wp_easy_prayer_categories
wp_easy_prayer_requests
wp_easy_prayer_settings
New WordPress options
fs_debug_mode
easy_prayer_db_version
fs_active_plugins
fs_gdpr
fs_accounts

Browser metrics Passed 4 tests

Easy Prayer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,861 ▲10715.65 ▲0.075.88 ▼0.602.75 ▲0.33
Dashboard /wp-admin2,958 ▲976.19 ▲0.02116.78 ▼13.91168.34 ▼0.81
Posts /wp-admin/edit.php2,756 ▲683.25 ▲0.0162.40 ▼1.63155.86 ▲13.62
Add New Post /wp-admin/post-new.php1,800 ▲8022.25 ▲1.36448.41 ▲3.64157.00 ▲5.51
Media Library /wp-admin/upload.php1,763 ▲685.66 ▲0.13143.11 ▲6.15208.80 ▲16.30
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius1,4532.4954.45122.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/easy-prayer/freemius/includes/class-freemius.php+8218
    Undefined property: stdClass::$plugins
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_easy_prayer_settings
    • wp_easy_prayer_categories
    • wp_easy_prayer_requests
  • Zombie WordPress options were found after uninstall: 5 options
    • fs_gdpr
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins
    • easy_prayer_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-prayer/trunk/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/easy-prayer/freemius/templates/ajax-loader.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/easy-prayer/trunk/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/easy-prayer/trunk/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/easy-prayer/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/easy-prayer/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/easy-prayer/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/easy-prayer/trunk/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/easy-prayer/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/easy-prayer/trunk/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/easy-prayer/trunk/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/easy-prayer/freemius/templates/account/partials/addon.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: requests, church, prayer

easy-prayer/easy-prayer.php Passed 13 tests

The main PHP script in "Easy Prayer" version 1.2 is automatically included on every request by WordPress
63 characters long description:
a plugin to create, collect, store, and display prayer requests

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin179,694 lines of code in 392 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14726,92238,855120,201
PHP1107,24016,01630,521
PO File126,9608,45515,240
CSS11938330613,359
Markdown1610192
Sass2333154
JSON10027

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,772)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity85.37
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes92
▷ Abstract classes44.35%
▷ Concrete classes8895.65%
▷ Final classes00.00%
Methods2,258
▷ Static methods34615.32%
▷ Public methods1,57669.80%
▷ Protected methods301.33%
▷ Private methods65228.88%
Functions236
▷ Named functions236100.00%
▷ Anonymous functions00.00%
Constants242
▷ Global constants19279.34%
▷ Class constants5020.66%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/easy-prayer.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
js/DataTables/DataTables-1.10.20/images/sort_desc.png0.15KB0.25KB0.00%
js/DataTables/DataTables-1.10.20/images/sort_asc_disabled.png0.14KB0.25KB0.00%
js/DataTables/DataTables-1.10.20/images/sort_both.png0.20KB0.29KB0.00%