84% charitas-lite

Code Review | Charitas Lite

WordPress plugin Charitas Lite scored84%from 54 tests.

About plugin

  • Plugin page: charitas-lite
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Aug 28, 2020
  • Latest release: Aug 30, 2020
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: victortihai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,796 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼9.53ms] Passed 4 tests

This is a short check of server-side resources used by Charitas Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1153.60 ▲6.91
Dashboard /wp-admin4.80 ▲1.4655.48 ▼11.76
Posts /wp-admin/edit.php3.52 ▲0.1651.64 ▼5.83
Add New Post /wp-admin/post-new.php6.20 ▲0.3189.94 ▼20.30
Media Library /wp-admin/upload.php3.33 ▲0.1037.93 ▼0.22
Add Staff /wp-admin/post-new.php?post_type=post_staff6.1986.30
All Causes /wp-admin/edit.php?post_type=post_causes3.3740.56
Add Project /wp-admin/post-new.php?post_type=post_projects6.1987.01
All Projects /wp-admin/edit.php?post_type=post_projects3.3739.88
Add Cause /wp-admin/post-new.php?post_type=post_causes6.1981.63
All Staff /wp-admin/edit.php?post_type=post_staff3.3741.51

Server storage [IO: ▲0.05MB] [DB: ▲0.31MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_charitas_lite_projects_widget
widget_charitas_lite_staff_widget
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_charitas_lite_causes_widget

Browser metrics Passed 4 tests

Charitas Lite: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.21 ▼0.152.34 ▲0.7242.64 ▲0.93
Dashboard /wp-admin2,196 ▲165.56 ▼0.1289.78 ▲0.6345.20 ▲5.49
Posts /wp-admin/edit.php2,181 ▲811.96 ▲0.0039.49 ▲5.0738.92 ▼0.24
Add New Post /wp-admin/post-new.php1,595 ▲6723.50 ▲0.45670.16 ▼7.6653.97 ▼8.78
Media Library /wp-admin/upload.php1,484 ▲814.20 ▼0.0298.94 ▼1.6742.93 ▼0.30
Add Staff /wp-admin/post-new.php?post_type=post_staff6,25922.13896.6929.14
All Causes /wp-admin/edit.php?post_type=post_causes1,1881.9831.3232.19
Add Project /wp-admin/post-new.php?post_type=post_projects1,58716.93744.0228.10
All Projects /wp-admin/edit.php?post_type=post_projects1,1701.9633.9630.44
Add Cause /wp-admin/post-new.php?post_type=post_causes1,58716.93697.9027.30
All Staff /wp-admin/edit.php?post_type=post_staff1,1881.9031.3831.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-comments
    • widget_charitas_lite_projects_widget
    • can_compress_scripts
    • widget_charitas_lite_causes_widget
    • theysaidso_admin_options
    • widget_charitas_lite_staff_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/charitas-lite/inc/widgets/widget-causes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/charitas-lite/inc/templates/single-post_causes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/charitas-lite/inc/templates/single-post_staff.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/charitas-lite/inc/templates/template-causes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/charitas-lite/inc/library.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/charitas-lite/inc/customizer.php:146
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/charitas-lite/inc/templates/single-post_projects.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/charitas-lite/inc/widgets/widget-staff.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/charitas-lite/inc/templates/template-projects.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/charitas-lite/inc/templates/template-staff.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
2 plugin tags: charity, team

charitas-lite/charitas-lite.php Passed 13 tests

The main PHP script in "Charitas Lite" version 1.0.1 is automatically included on every request by WordPress
67 characters long description:
Charitas Lite WPLook will Extend the Charitas Lite WordPress Theme.

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
Good job! No executable or dangerous file extensions detected1,116 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP162262631,116

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.14
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin