56% foopeople

Code Review | Human Resource Management (HRM) for WordPress - FooPeople

WordPress plugin Human Resource Management (HRM) for WordPress - FooPeople scored 56% from 54 tests.

About plugin

  • Plugin page: foopeople
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.9.2
  • First release: Apr 20, 2021
  • Latest release: Apr 21, 2021
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: bradvin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 319 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲0.63MB] [CPU: ▼292.24ms] Passed 4 tests

Analyzing server-side resources used by Human Resource Management (HRM) for WordPress - FooPeople
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6358.05 ▲6.97
Dashboard /wp-admin4.02 ▲0.6236.44 ▲2.50
Posts /wp-admin/edit.php4.25 ▲0.6139.50 ▲1.88
Add New Post /wp-admin/post-new.php7.89 ▲0.9295.92 ▼1,176.76
Media Library /wp-admin/upload.php3.97 ▲0.6727.65 ▲3.44
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius4.3126.66
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php5.4070.53

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 363 new files
Database: no new tables, 6 new options
New WordPress options
fs_active_plugins
widget_recent-comments
fs_gdpr
fs_debug_mode
widget_recent-posts
fs_accounts

Browser metrics Passed 4 tests

An overview of browser requirements for Human Resource Management (HRM) for WordPress - FooPeople
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,955 ▲20116.73 ▲1.029.14 ▲2.762.29 ▼0.39
Dashboard /wp-admin2,956 ▲956.17 ▲0.01117.99 ▼13.64171.02 ▲8.96
Posts /wp-admin/edit.php2,752 ▲583.38 ▲0.0362.69 ▼0.31154.83 ▲18.34
Add New Post /wp-admin/post-new.php1,701 ▼3015.63 ▼2.81422.39 ▲10.09158.80 ▼11.24
Media Library /wp-admin/upload.php1,757 ▲595.56 ▲0.04138.51 ▼6.03196.57 ▲10.91
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius1,4622.5554.65114.03
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php7,98921.02518.40188.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/foopeople/freemius/includes/class-freemius.php+8552
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 6 options
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins
    • fs_gdpr
    • 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)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

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
The following issues need your attention
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/foopeople/includes/templates/people-organogram.php
    • > /wp-content/plugins/foopeople/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/foopeople/includes/templates/people-organogram-item.php
    • > /wp-content/plugins/foopeople/includes/admin/views/settings.php
    • > /wp-content/plugins/foopeople/includes/templates/admin/person-preview.php
  • 98× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foopeople/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foopeople/vendor/composer/installers/src/Composer/Installers/AglInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foopeople/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foopeople/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'FooPlugins\\FooPeople\\Admin\\FooFields\\Metabox' not found in wp-content/plugins/foopeople/includes/admin/person/class-metabox-main-details.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foopeople/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foopeople/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php:4
    • > PHP Warning
      Use of undefined constant FOOPEOPLE_URL - assumed 'FOOPEOPLE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/foopeople/includes/templates/people-organogram-item.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'FooPlugins\\FooPeople\\Admin\\FooFields\\Fields\\Field' not found in wp-content/plugins/foopeople/includes/admin/foofields/fields/class-repeater-index.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foopeople/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Network (severe)
    wp-content/plugins/foopeople/css/foopeople.customizer.min.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots lack descriptions #2, #4 in foopeople/assets to your readme.txt
  • Screenshots: These screenshots require images: #5 (6.), #7 ()
You can take inspiration from this readme.txt

foopeople/foopeople.php Passed 13 tests

The main PHP script in "Human Resource Management (HRM) for WordPress - FooPeople" version 1.0.4 is automatically included on every request by WordPress
45 characters long description:
Human Resource Management (HRM) for WordPress

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin47,312 lines of code in 296 files:
LanguageFilesBlank linesComment linesLines of code
PHP2178,67017,98737,096
JavaScript301,1973,9966,657
CSS26831492,352
Sass17158131863
JSON200153
Markdown2320142
SVG10026
XML12023

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity36.19
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces26
Interfaces0
Traits0
Classes132
▷ Abstract classes96.82%
▷ Concrete classes12393.18%
▷ Final classes00.00%
Methods1,447
▷ Static methods18112.51%
▷ Public methods1,07874.50%
▷ Protected methods372.56%
▷ Private methods33222.94%
Functions125
▷ Named functions11692.80%
▷ Anonymous functions97.20%
Constants148
▷ Global constants12181.76%
▷ Class constants2718.24%
▷ Public constants27100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
(invalid) assets/img/default_person_portrait.png3.41KB0.00KB▼ 100.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%