56% js-jobs

Code Review | JS Job Manager

WordPress plugin JS Job Manager scored56%from 54 tests.

About plugin

  • Plugin page: js-jobs
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2.2
  • WordPress version: 6.3.1
  • First release: May 28, 2016
  • Latest release: Jun 1, 2023
  • Number of updates: 117
  • Update frequency: every 21.9 days
  • Top authors: rabilal (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

1,000+ active /39,606 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲1.51MB] [CPU: ▲12.24ms] 75% from 4 tests

Server-side resources used by JS Job Manager
Please take the time to fix the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,082.50ms on /wp-admin/admin.php?page=jsjobs)
PageMemory (MB)CPU Time (ms)
Home /5.89 ▲2.4258.13 ▲22.38
Dashboard /wp-admin5.17 ▲1.8661.29 ▲16.85
Posts /wp-admin/edit.php4.75 ▲1.3959.64 ▲12.35
Add New Post /wp-admin/post-new.php7.29 ▲1.4090.64 ▲2.20
Media Library /wp-admin/upload.php4.61 ▲1.3951.27 ▲17.57
Email Templates /wp-admin/admin.php?page=jsjobs_emailtemplate5.3250.85
System Errors /wp-admin/admin.php?page=jsjobs_systemerror4.9249.34
Pro Installer /wp-admin/admin.php?page=jsjobs_proinstaller4.6539.74
JS Jobs Settings /wp-admin/admin.php?page=jsjobs_postinstallation5.4746.95
Job Types /wp-admin/admin.php?page=jsjobs_jobtype5.0151.24
JS Jobs /wp-admin/admin.php?page=jsjobs5.271,082.50
Tags /wp-admin/admin.php?page=jsjobs&jsjobslt=profeatures4.9446.41
Departments /wp-admin/admin.php?page=jsjobs_departments5.0952.53
Address Data /wp-admin/admin.php?page=jsjobs_addressdata4.9347.38
Payment Method Configuration /wp-admin/admin.php?page=jsjobs_paymenthistorymethodconfiguration4.5442.40

Server storage [IO: ▲10.98MB] [DB: ▲0.15MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 924 new files
Database: 37 new tables, 10 new options
New tables
wp_js_job_experiences
wp_js_job_jobtypes
wp_js_job_resumeinstitutes
wp_js_job_users
wp_js_job_shifts
wp_js_job_currencies
wp_js_job_companycities
wp_js_job_categories
wp_js_job_ages
wp_js_job_coverletters
...
New WordPress options
can_compress_scripts
jsjobs_post_installation
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
jsjobs_do_activation_redirect
_wpjsjob_session_
theysaidso_admin_options
db_upgraded
widget_jsjobsjobssearchjobs_widget

Browser metrics Passed 4 tests

An overview of browser requirements for JS Job Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,255 ▲49414.00 ▼0.639.02 ▲7.0319.29 ▼21.02
Dashboard /wp-admin2,646 ▲4665.00 ▼0.6799.85 ▲12.93111.22 ▲75.10
Posts /wp-admin/edit.php2,182 ▲822.29 ▲0.3144.25 ▲8.4334.09 ▼0.78
Add New Post /wp-admin/post-new.php1,752 ▲22424.44 ▲1.28725.88 ▲29.0335.26 ▼27.37
Media Library /wp-admin/upload.php1,479 ▲794.53 ▲0.34103.25 ▼8.2978.50 ▲31.72
Email Templates /wp-admin/admin.php?page=jsjobs_emailtemplate2,2296.32125.11113.38
System Errors /wp-admin/admin.php?page=jsjobs_systemerror1,5542.0033.0267.98
Pro Installer /wp-admin/admin.php?page=jsjobs_proinstaller7351.4013.1317.95
JS Jobs Settings /wp-admin/admin.php?page=jsjobs_postinstallation1,1542.0129.0340.14
Job Types /wp-admin/admin.php?page=jsjobs_jobtype1,7762.0133.7381.64
JS Jobs /wp-admin/admin.php?page=jsjobs2,9635.4953.57144.60
Tags /wp-admin/admin.php?page=jsjobs&jsjobslt=profeatures2,0291.9832.0297.90
Departments /wp-admin/admin.php?page=jsjobs_departments1,6211.9833.7770.37
Address Data /wp-admin/admin.php?page=jsjobs_addressdata1,6632.0134.7179.75
Payment Method Configuration /wp-admin/admin.php?page=jsjobs_paymenthistorymethodconfiguration8611.9030.5723.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_js_job_jsjobsessiondata
  • Zombie WordPress options were found after uninstall: 9 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_jsjobsjobssearchjobs_widget
    • widget_recent-posts
    • jsjobs_post_installation
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • _wpjsjob_session_

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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=jsjobs_paymenthistorymethodconfiguration
    • > Warning in wp-content/plugins/js-jobs/includes/includer.php+29
    include_once(wp-content/plugins/js-jobs/modules/paymenthistorymethodconfiguration/controller.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=jsjobs_paymenthistorymethodconfiguration
    • > Warning in wp-content/plugins/js-jobs/includes/includer.php+29
    include_once(): Failed opening 'wp-content/plugins/js-jobs/modules/paymenthistorymethodconfiguration/controller.php' for inclusion (include_path='.:/usr/share/php')

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
  • 328× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/js-jobs/modules/proinstaller/controller.php
    • > /wp-content/plugins/js-jobs/modules/user/tmpl/userregister.php
    • > /wp-content/plugins/js-jobs/modules/salaryrange/tmpl/admin_salaryrange.php
    • > /wp-content/plugins/js-jobs/includes/tables/resumereferences.php
    • > /wp-content/plugins/js-jobs/includes/tables/activitylog.php
    • > /wp-content/plugins/js-jobs/includes/deactivation.php
    • > /wp-content/plugins/js-jobs/includes/tables/resumefile.php
    • > /wp-content/plugins/js-jobs/modules/highesteducation/tmpl/admin_highesteducations.php
    • > /wp-content/plugins/js-jobs/includes/tables/currency.php
    • > /wp-content/plugins/js-jobs/includes/tables/resumesearch.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/js-jobs/modules/postinstallation/tmpl/admin_stepone.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/js-jobs/modules/postinstallation/tmpl/admin_demoimporter.php:8
    • > PHP Warning
      Use of undefined constant JSJOBS_PLUGIN_PATH - assumed 'JSJOBS_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/js-jobs/modules/resume/tmpl/font/unifont/dejavusanscondensed.mtx.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/js-jobs/modules/postinstallation/tmpl/admin_stepthree.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/js-jobs/modules/postinstallation/tmpl/admin_stepfour.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'jsjobs' not found in wp-content/plugins/js-jobs/modules/resume/tmpl/resumes.inc.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'jsjobs' not found in wp-content/plugins/js-jobs/modules/postinstallation/tmpl/admin_themedemodata.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_names() on null in wp-content/plugins/js-jobs/modules/postinstallation/tmpl/admin_steptwo.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jsjobs_paymenthistorymethodconfiguration
    • > Javascript (severe) in unknown
    https://www.google.com/jsapi?autoload=%7B%27modules%27%3A%5B%7B%27name%27%3A%27visualization%27%2C%27version%27%3A%271%27%2C%27packages%27%3A%5B%27corechart%27%5D%7D%5D%7D&ver=6.3.1 150:139 Uncaught Error: Autoload failed with: SyntaxError: Expected proper…me or '}' in JSON at position 1 (line 1 column 2)
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jsjobs_paymenthistorymethodconfiguration
    • > Javascript (severe) in unknown
    /wp-content/plugins/js-jobs/includes/js/chosen/chosen.jquery.min.js?ver=6.3.1 1:8199 Uncaught SyntaxError: Unexpected token ':'

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Tags: There are too many tags (28 tag instead of maximum 10)
Please take inspiration from this readme.txt

js-jobs/js-jobs.php 92% from 13 tests

The main PHP script in "JS Job Manager" version 2.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin92,913 lines of code in 389 files:
LanguageFilesBlank linesComment linesLines of code
PHP3385,5919,70072,520
CSS202031567,190
PO File13,52007,145
SVG2002,959
JavaScript53154472,090
SQL214301,007
HTML2002

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 592)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity61.92
▷ Minimum class complexity1.00
▷ Maximum class complexity856.00
Average method complexity7.22
▷ Minimum method complexity1.00
▷ Maximum method complexity592.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes162
▷ Abstract classes00.00%
▷ Concrete classes162100.00%
▷ Final classes00.00%
Methods1,588
▷ Static methods1076.74%
▷ Public methods1,51595.40%
▷ Protected methods442.77%
▷ Private methods291.83%
Functions58
▷ Named functions5798.28%
▷ Anonymous functions11.72%
Constants56
▷ Global constants56100.00%
▷ Class constants00.00%
▷ Public constants00.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
438 PNG files occupy 2.90MB with 1.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/admin_jsjobs2.png0.62KB0.63KB0.00%
includes/images/errors/2.png17.43KB6.01KB▼ 65.51%
includes/images/control_panel/jobseeker/job-categories.png3.15KB1.84KB▼ 41.43%
includes/images/control_panel/no record icon.png4.69KB1.75KB▼ 62.82%
includes/images/left-icons/role.png4.54KB1.38KB▼ 69.54%