58% wp-job-manager

Code Review | WP Job Manager

WordPress plugin WP Job Manager scored58%from 54 tests.

About plugin

  • Plugin page: wp-job-manager
  • Plugin version: 2.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.4
  • WordPress version: 6.3.1
  • First release: Jul 11, 2013
  • Latest release: Nov 21, 2023
  • Number of updates: 250
  • Update frequency: every 15.3 days
  • Top authors: mikejolley (54%)jakeom (26.8%)mikeyarce (4.4%)alexsanford1 (3.6%)kraftbj (2.8%)

Code review

54 tests

User reviews

229 reviews

Install metrics

100,000+ active /4,087,074 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.58MB] [CPU: ▲6.38ms] Passed 4 tests

This is a short check of server-side resources used by WP Job Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4342.06 ▲2.21
Dashboard /wp-admin3.92 ▲0.6256.82 ▲5.88
Posts /wp-admin/edit.php3.99 ▲0.6354.72 ▲6.27
Add New Post /wp-admin/post-new.php6.59 ▲0.71101.80 ▲16.05
Media Library /wp-admin/upload.php3.86 ▲0.6444.80 ▲11.17
Applications Pro /wp-admin/edit.php?post_type=job_listing&page=job-manager-landing-application3.7741.50
Job Listings /wp-admin/edit.php?post_type=job_listing3.94219.79
Settings /wp-admin/edit.php?post_type=job_listing&page=job-manager-settings3.7947.91
Resumes Pro /wp-admin/edit.php?post_type=job_listing&page=job-manager-landing-resumes3.7739.50
Setup /wp-admin/index.php?page=job-manager-setup3.8141.68
Marketplace /wp-admin/edit.php?post_type=job_listing&page=job-manager-marketplace4.09386.39

Server storage [IO: ▲1.53MB] [DB: ▲0.04MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 202 new files
Database: no new tables, 63 new options
New WordPress options
job_manager_enable_remote_position
jm_promoted_job_count
theysaidso_admin_options
job_manager_enable_types
job_manager_permalinks
job_manager_multi_job_type
job_manager_email_admin_updated_job
job_manager_user_edit_published_submissions
job_manager_hide_expired_content
job_manager_enable_recaptcha_job_submission
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Job Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲10714.14 ▼0.241.68 ▼0.1934.33 ▼10.25
Dashboard /wp-admin2,269 ▲895.56 ▼0.1196.99 ▲9.2787.30 ▲50.34
Posts /wp-admin/edit.php2,155 ▲522.02 ▲0.0237.52 ▼3.6632.01 ▼2.69
Add New Post /wp-admin/post-new.php1,573 ▲4223.20 ▲0.07623.17 ▲32.2349.88 ▼0.84
Media Library /wp-admin/upload.php1,455 ▲524.21 ▲0.04100.93 ▲1.4641.46 ▼3.73
Applications Pro /wp-admin/edit.php?post_type=job_listing&page=job-manager-landing-application9802.0523.2138.99
Job Listings /wp-admin/edit.php?post_type=job_listing1,4042.7440.0932.72
Settings /wp-admin/edit.php?post_type=job_listing&page=job-manager-settings2,0492.5344.9135.37
Resumes Pro /wp-admin/edit.php?post_type=job_listing&page=job-manager-landing-resumes9802.0524.5832.70
Setup /wp-admin/index.php?page=job-manager-setup8862.0027.8336.05
Marketplace /wp-admin/edit.php?post_type=job_listing&page=job-manager-marketplace2,4302.4637.4354.79

Uninstaller [IO: ▲1.53MB] [DB: ▲0.04MB] 25% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Compile error in wp-content/plugins/wp-job-manager/includes/class-wp-job-manager-usage-tracking.php+0
    Cannot declare class WP_Job_Manager_Usage_Tracking, because the name is already in use
  • The plugin did not uninstall correctly, leaving 202 files (1.53MB) in the plugin directory
    • (new file) assets/dist/css/frontend.css
    • (new file) assets/dist/css/admin-notices.asset.php
    • (new file) assets/dist/css/frontend.asset.php
    • (new file) LICENSE
    • (new file) assets/dist/css/job-listings.asset.php
    • (new file) assets/dist/css/admin-notices.css
    • (new file) assets/dist/css/admin.css
    • (new file) assets/dist/css/admin.asset.php
    • (new file) assets/dist/css/admin-landing.asset.php
    • (new file) assets/dist/css/admin-landing.css
    • ...
  • The uninstall procedure has failed, leaving 64 options in the database
    • job_manager_per_page
    • job_manager_enable_categories
    • widget_widget_recent_jobs
    • theysaidso_admin_options
    • job_manager_registration_role
    • db_upgraded
    • job_manager_job_dashboard_page_id
    • job_manager_email_admin_expiring_job
    • job_manager_installed_terms
    • job_manager_user_can_edit_pending_submissions
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 13× 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/wp-job-manager/includes/3rd-party/all-in-one-seo-pack.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-job-manager/includes/3rd-party/wpcom.php:54
    • > PHP Fatal error
      require_once(): Failed opening required 'JOB_MANAGER_PLUGIN_DIR/includes/3rd-party/jetpack.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-job-manager/includes/3rd-party/3rd-party.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-job-manager/includes/3rd-party/wpml.php:27
    • > PHP Warning
      require_once(JOB_MANAGER_PLUGIN_DIR/includes/3rd-party/jetpack.php): failed to open stream: No such file or directory in wp-content/plugins/wp-job-manager/includes/3rd-party/3rd-party.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-job-manager/includes/3rd-party/wp-all-import.php:8
    • > PHP Warning
      Use of undefined constant JOB_MANAGER_PLUGIN_DIR - assumed 'JOB_MANAGER_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-job-manager/includes/3rd-party/3rd-party.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-job-manager/includes/3rd-party/polylang.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-job-manager/wp-job-manager-functions.php:1312
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-job-manager/wp-job-manager-template.php:106

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=job_listing&page=job-manager-marketplace
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-job-manager/assets/dist/js/admin/job-tags-upsell.js?ver=52fbed459b43366f375c 0:135 Uncaught TypeError: Cannot read properties of undefined (reading 'registerPlugin')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 25 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-job-manager/wp-job-manager.php 92% from 13 tests

The primary PHP file in "WP Job Manager" version 2.1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.2" instead of "7.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected19,838 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1583,3999,83516,629
JavaScript202334012,778
CSS111025410
XML10020
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity34.21
▷ Minimum class complexity1.00
▷ Maximum class complexity200.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes58
▷ Abstract classes46.90%
▷ Concrete classes5493.10%
▷ Final classes11.85%
Methods815
▷ Static methods24129.57%
▷ Public methods55968.59%
▷ Protected methods779.45%
▷ Private methods17921.96%
Functions145
▷ Named functions13089.66%
▷ Anonymous functions1510.34%
Constants65
▷ Global constants57.69%
▷ Class constants6092.31%
▷ Public constants5490.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/lib/jquery-chosen/images/chosen-sprite.png0.63KB0.88KB0.00%
assets/images/wpjm-logo.png1.23KB0.87KB▼ 29.22%
assets/images/company.png8.09KB1.75KB▼ 78.35%
assets/lib/jquery-chosen/images/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%