72% employee-staff-directory

Code Review | Employee Directory - Staff Directory and Listing

WordPress plugin Employee Directory - Staff Directory and Listing scored72%from 54 tests.

About plugin

  • Plugin page: employee-staff-di...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.0
  • WordPress version: 6.3.1
  • First release: Mar 22, 2022
  • Latest release: Jul 27, 2022
  • Number of updates: 8
  • Update frequency: every 16.6 days
  • Top authors: radhikaxecurify (87.5%)cyberlord92 (25%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,170 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
Installer ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▲3.45ms] Passed 4 tests

Analyzing server-side resources used by Employee Directory - Staff Directory and Listing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6447.41 ▲4.56
Dashboard /wp-admin52.50 ▲49.1510,111,280.42 ▲10,111,225.53
Posts /wp-admin/edit.php4.03 ▲0.6355.60 ▲1.80
Add New Post /wp-admin/post-new.php6.65 ▲0.7295.16 ▼5.75
Media Library /wp-admin/upload.php3.83 ▲0.5550.80 ▲13.20
Departments /wp-admin/edit-tags.php?taxonomy=employee-directory-department&post_type=employee-directory3.8247.08
Add New Employee /wp-admin/post-new.php?post_type=employee-directory4.0367.53
Employment Types /wp-admin/edit-tags.php?taxonomy=employee-directory-etype&post_type=employee-directory3.8448.09
Need Support /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-support3.8040.93
Settings /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-settings3.8141.88
Employee Directory /wp-admin/edit.php?post_type=employee-directory4.0554.12
Premium Plans /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-license3.8140.73
Instructions /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-instruction3.8040.38
Gender /wp-admin/edit-tags.php?taxonomy=employee-directory-gender&post_type=employee-directory3.8442.82

Server storage [IO: ▲1.08MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 65 new files
Database: no new tables, 11 new options
New WordPress options
Activated_Plugin
can_compress_scripts
widget_theysaidso_widget
employee-directory-etype_children
theysaidso_admin_options
Activation_term_flag
employee-directory-gender_children
widget_recent-comments
mo_emp_activation_mail
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for Employee Directory - Staff Directory and Listing
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,343 ▲59714.84 ▲0.5612.33 ▲10.7943.61 ▲5.01
Dashboard /wp-admin2,355 ▲1755.25 ▼0.42102.79 ▲11.8673.08 ▲31.61
Posts /wp-admin/edit.php2,261 ▲1612.43 ▲0.4134.45 ▼5.8333.55 ▼4.15
Add New Post /wp-admin/post-new.php1,595 ▲6723.35 ▲0.30695.86 ▲64.87165.81 ▲103.22
Media Library /wp-admin/upload.php1,661 ▲2585.15 ▲0.98107.08 ▲3.7776.32 ▲31.57
Departments /wp-admin/edit-tags.php?taxonomy=employee-directory-department&post_type=employee-directory1,4582.0831.7236.47
Add New Employee /wp-admin/post-new.php?post_type=employee-directory2,9648.44179.22125.15
Employment Types /wp-admin/edit-tags.php?taxonomy=employee-directory-etype&post_type=employee-directory1,6212.4329.9736.79
Need Support /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-support4,2282.6652.4756.82
Settings /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-settings1,2242.1625.2241.24
Employee Directory /wp-admin/edit.php?post_type=employee-directory2,2732.2038.2032.54
Premium Plans /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-license1,3122.5129.4688.26
Instructions /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-instruction1,3302.2325.6143.38
Gender /wp-admin/edit-tags.php?taxonomy=employee-directory-gender&post_type=employee-directory1,6842.1034.0835.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • employee-directory-etype_children
    • widget_theysaidso_widget
    • mo_emp_activation_mail
    • theysaidso_admin_options
    • widget_recent-posts
    • employee-directory-gender_children
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 119 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=employee-directory-gender&post_type=employee-directory
    • > 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
  • 119 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=employee-directory-gender&post_type=employee-directory
    • > 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

SRP 50% 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 fix the following items
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/employee-staff-directory/handler/mo-empdir-feedback_handler.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/employee-staff-directory/handler/mo-empdir-feedback_handler.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/employee-staff-directory/templates/mo-empdir-all_employees.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/employee-staff-directory/mo-empdir-employee_directory.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/employee-staff-directory/templates/mo-empdir-layout1.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/image.php' (include_path='.:/usr/share/php') in wp-content/plugins/employee-staff-directory/mo-empdir-employee_directory.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'MOESD_taxonomies_handler' not found in wp-content/plugins/employee-staff-directory/templates/mo-empdir-content-staff-member.php:10
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/employee-staff-directory/handler/mo-empdir-feedback_handler.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory in wp-content/plugins/employee-staff-directory/mo-empdir-employee_directory.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/employee-staff-directory/handler/mo-empdir-feedback_handler.php on line 6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-support
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $ is not a function" "TypeError: $ is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/employee-staff-directory/assets/js/views.js?ver=1.2.1:45:8)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=employee-directory&page=employee-directory-support
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

employee-staff-directory/mo-empdir-employee_directory.php 85% from 13 tests

"Employee Directory - Staff Directory and Listing" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("employee-staff-directory.php" instead of "mo-empdir-employee_directory.php")

Code Analysis Passed 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
No dangerous file extensions were detected3,591 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP27514373,024
CSS66112391
JavaScript2241174
SVG2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.29
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods74
▷ Static methods00.00%
▷ Public methods7297.30%
▷ Protected methods00.00%
▷ Private methods22.70%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
22 PNG files occupy 0.60MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/normal.png15.74KB7.91KB▼ 49.78%
assets/css/images/sad.png18.16KB8.79KB▼ 51.62%
assets/css/images/angry.png20.40KB9.65KB▼ 52.68%
assets/img/crown.png12.17KB5.93KB▼ 51.25%
assets/img/profile_picture_format.png78.65KB25.30KB▼ 67.83%